search and match a record

pals70423

New Member
Joined
Feb 6, 2011
Messages
25
Hi All,
Need your help.i have requirement where i have following data


sheet 1
--------

data value
----- -----
test1 4
test2 0
test 3 0
test4 6
test7 1


sheet 2
--------


data1 data2 value
test1test24
test3test46
test6test71

<tbody>
</tbody>


i have sheet1 where there are 2 columns data and value and sheet 2 which has 3 columns.i need to populate the sheet 1 values in the sheet 2 values based on the below criteria

search for the value of the column "data" in the sheet 2 and populate the non zero value in sheet 2.the columns are dynamic in sheet 1

Thanks
pal
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Not sure if elegant:

Excel 2010
ABCDEFG
1datavaluedata1data2value
2test14test1test24
3test20test3test45
4test35test5test66
5test40
6test50
7test66
pals70423


formula in G2 is =SUM(IF($A$2:$A$7=E2,$B$2:$B$7),IF($A$2:$A$7=F2,$B$2:$B$7)) Ctrl + Shift + Enter not just enter on a PC or command + Return on a MAC.
or non array =INDEX($B$2:B7,MATCH($E2,$A$2:A7,0))+INDEX($B$2:B7,MATCH($F2,$A$2:A7,0)) copied down till needed.
 
Upvote 0
Not sure if elegant:
Excel 2010
ABCDEFG
1datavaluedata1data2value
2test14test1test24
3test20test3test45
4test35test5test66
5test40
6test50
7test66

<colgroup><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
pals70423



formula in G2 is =SUM(IF($A$2:$A$7=E2,$B$2:$B$7),IF($A$2:$A$7=F2,$B$2:$B$7)) Ctrl + Shift + Enter not just enter on a PC or command + Return on a MAC.
or non array =INDEX($B$2:B7,MATCH($E2,$A$2:A7,0))+INDEX($B$2:B7,MATCH($F2,$A$2:A7,0)) copied down till needed.


Hi
it is working perfectly..thanks a lot for your help.

Thanks
pal
 
Upvote 0
Most welcome. Thanks for your feedback.
 
Upvote 0

Forum statistics

Threads
1,214,807
Messages
6,121,679
Members
449,047
Latest member
notmrdurden

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top