need help with vlookup or macro

ncexcel

New Member
Joined
Sep 2, 2014
Messages
6
i need to search if value in excel sheet B exists between values in excel sheet A between start and end


excel sheet A

STARTENDHBWLBW
09992243117945
100019992239517916

<tbody>
</tbody>


Sheet B

500

Since 500 exists between 0 and 999, i want 22431 returned. how can i accomplish this?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Assuming 500 is in cell A1 of Sheet B, use below formula in B1:

Code:
=SUMPRODUCT(FREQUENCY(A1,'Sheet A'!$B$2:$B$3),'Sheet A'!$C$2:$C$4)
 
Upvote 0
That didn't work. I am not looking to see how many times the value occurs. i am looking if a value is between two columns then get the corresponding value from that row for a different column
 
Upvote 0
Is your Sheet A setup like below with the name as "Sheet A"?
A
B
C
D
1
START
END
HBW
LBW
2
0
999
22431
17945
3
1000
1999
22395
17916

<TBODY>
</TBODY>

Can you perhaps give more details on what happened when you entered the formula?
 
Upvote 0
yes i pasted two rows there are 32 rows


=SUMPRODUCT(FREQUENCY(A2,SheetA!A$2:A$32),SheetA!$B$2:$B$32)

#VALUE! is what the formula returned
 
Upvote 0
now i get values but they are incorrect . for example

in SheetA has 32 rows and sheetB, i have 18000 rows.

SheetA

Loop Length STARTENDHighest BWLowest BW
09992243117945
100019992239517916
200029992162317298
300039992114116913
400049992024816198
500059991892615141
600069991823114585
700079991680713446
800089991545412363
900099991429711438
10000109991310110481
1100011999116559324
1200012999101458116
130001399989387150
140001499978036242
150001599965395231
160001699958114649
170001799949523962
180001899941723338
190001999935592847
200002099929432354
210002199924991999
220002299920581646
230002399917351388
240002499914261141
25000259991132906
2600026999906725
2700027999709567
2800028999501401
2900029999213170
30000100000127102

<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>


sheet B

Sheet B
0 populates 999 instead of 22431
20 populates 1999 (should be 999 and 22431)
 
Upvote 0
oh thank you thank you.;). too excited about getting this worked out. although i cant understand how the formula works :ROFLMAO:
 
Upvote 0

Forum statistics

Threads
1,214,377
Messages
6,119,185
Members
448,872
Latest member
lcaw

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