Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8182225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:47:21+00:00 2026-06-07T00:47:21+00:00

I have an excel_1 with 4 columns (A, B, C, score) with different combinations.

  • 0

I have an excel_1 with 4 columns (A, B, C, score) with different combinations. I have another excel_2 with 3 columns (A, B, C). I would like according A, B, C and find out score. I’m trying using excel index and match function, but i still can not figure out. without coding, it really make me trouble to match it one by one…May i know how to write code in Matlab?

Example:

excel_1
99 5 35 12
99 2 32 14
97 5 13 94
...

excel_2
97 5 13
99 2 32
...

After execute the code,

Result:

excel_2
97 5 13 94
99 2 32 14
...

Thanks a lot…

A = xlsread('excel_1.xlsx');
B = xlsread('excel_2.xlsx');

[~,J] = ismember(B,A(:,1:size(B,2)),'rows');
if any(J)
    result = A(J,:);
end

??? Subscript indices must either be real positive integers or logicals.

Error in ==> Untitled at 6
    result = A(J,:);    

Solved. can not exist impossible between B and A.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:47:23+00:00Added an answer on June 7, 2026 at 12:47 am

    May be you can try this.

    [~,J] = ismember(excel_2,excel_1(:,1:size(excel_2,2)),'rows');
    if any(J)
       result = excel_1(J,:);
    end
    

    Then

    result =
    
        97     5    13    94
        99     2    32    14
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an excel sheet laid out like so: +--id---+--val--+--timestamp--+ | 01 | 1.2
I have the following excel formulae in different columns: = IF( OR(D2 <1000, D2
I have an Excel table with 4 columns and need to find the values
I have an excel with 8 columns. I'm trying to add a new column
I have two columns in Excel, like this: A B 0.5 0.4 0.6 0.59
I have an excel column that looks like this: Person 1, Person 2 Person
I have 7 columns that have a yes or no in them (N2-T2). I
I have two columns of integers between 1 and 16 in an excel file.
I have a huge xlsx file (aboutn 127 MB) and want to read using
I have an excel spreadsheet with two columns. The first column is a label

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.