Fill range with criteria

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Range 1:B35:B49 contiguous rows & generates numerical values
Range2: D38:D49 non-contiguous rows & generates numerical values
Range 3: F35:F49 contiguous rows & generates numerical values

Output: H38:H49 should get corresponding F MATCHING D with B

How to accomplish please, thanks.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Are you able to post some data and expected result
@Skybluekid
Here it is
MATCH.xlsx
BCDEFGH
354160011
364170022
374180033
3841900418004433
3942000419005544
4042100420006655
414220077
4242300421008866
4342400422009977
4442500111
45426004230022288
46427004240033399
4742800444
484290042500555111
494300042600666222
Sheet2
 
Upvote 0
try this:
mr excel questions 25.xlsm
ABCDEFGH
14160011
24170022
34180033
44190041800443333
54200041900554444
64210042000665555
74220077 
84230042100886666
94240042200997777
1042500111 
1142600423002228888
1242700424003339999
1342800444 
144290042500555111111
154300042600666222222
hsandeep
Cell Formulas
RangeFormula
H4:H15H4=IFERROR(INDEX($E$1:$E$15,MATCH(C4,$A$1:$A$15)),"")
 
Upvote 0
try this:
mr excel questions 25.xlsm
ABCDEFGH
14160011
24170022
34180033
44190041800443333
54200041900554444
64210042000665555
74220077 
84230042100886666
94240042200997777
1042500111 
1142600423002228888
1242700424003339999
1342800444 
144290042500555111111
154300042600666222222
hsandeep
Cell Formulas
RangeFormula
H4:H15H4=IFERROR(INDEX($E$1:$E$15,MATCH(C4,$A$1:$A$15)),"")
@awoohaw
Thanks, It is the formula needed. It works well. BTW will you recommend adding a 0 (zero in the formula)

=IFERROR(INDEX($E$1:$E$15,MATCH(C4,$A$1:$A$15,0)),"")
 
Upvote 0
try this:
mr excel questions 25.xlsm
ABCDEFGH
14160011
24170022
34180033
44190041800443333
54200041900554444
64210042000665555
74220077 
84230042100886666
94240042200997777
1042500111 
1142600423002228888
1242700424003339999
1342800444 
144290042500555111111
154300042600666222222
hsandeep
Cell Formulas
RangeFormula
H4:H15H4=IFERROR(INDEX($E$1:$E$15,MATCH(C4,$A$1:$A$15)),"")
I am getting #N/A. Actually value of A1:A15 depends on B1:B15. Formula for A1:A15 shown. What to do?
MATCH.xlsx
ABCDEFGH
141600BANKNIFTY23APR41600CE11
241700BANKNIFTY23APR41700CE22
341800BANKNIFTY23APR41800CE33
441900BANKNIFTY23APR41900CE418004433#N/A
542000BANKNIFTY23APR42000CE419005544#N/A
642100BANKNIFTY23APR42100CE420006655#N/A
742200BANKNIFTY23APR42200CE77#N/A
842300BANKNIFTY23APR42300CE421008866#N/A
942400BANKNIFTY23APR42400CE422009977#N/A
1042500BANKNIFTY23APR42500CE111#N/A
1142600BANKNIFTY23APR42600CE4230022288#N/A
1242700BANKNIFTY23APR42700CE4240033399#N/A
1342800BANKNIFTY23APR42800CE444#N/A
1442900BANKNIFTY23APR42900CE42500555111#N/A
1543000BANKNIFTY23APR43000CE42600666222#N/A
Sheet3
Cell Formulas
RangeFormula
A1:A15A1=MID(B1,LEN(B1)-6,5)
H4:H15H4=INDEX($E$1:$E$15,MATCH(C4,$A$1:$A$15))
 
Upvote 0
Here you go. You MUST enter the formula with the CSE keystroke (CNTL-SHFT-ENTER), when you see the braces around the formula that is when you know you used the CSE keystroke to enter a formula. The double minus converts the text string to a number:
mr excel questions 25.xlsm
ABCDEFGHI
141600BANKNIFTY23APR41600CE11
241700BANKNIFTY23APR41700CE22
341800BANKNIFTY23APR41800CE33
441900BANKNIFTY23APR41900CE4180044333333
542000BANKNIFTY23APR42000CE4190055444444
642100BANKNIFTY23APR42100CE4200066555555
742200BANKNIFTY23APR42200CE77 
842300BANKNIFTY23APR42300CE4210088666666
942400BANKNIFTY23APR42400CE4220099777777
1042500BANKNIFTY23APR42500CE111 
1142600BANKNIFTY23APR42600CE42300222888888
1242700BANKNIFTY23APR42700CE42400333999999
1342800BANKNIFTY23APR42800CE444 
1442900BANKNIFTY23APR42900CE42500555111111111
1543000BANKNIFTY23APR43000CE42600666222222222
hsandeep
Cell Formulas
RangeFormula
A1:A15A1=MID(B1,LEN(B1)-6,5)
I4:I15I4=IFERROR(INDEX($E$1:$E$15,MATCH(C4,--MID($B$1:$B$15,15,5),0)),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
Here you go. You MUST enter the formula with the CSE keystroke (CNTL-SHFT-ENTER), when you see the braces around the formula that is when you know you used the CSE keystroke to enter a formula. The double minus converts the text string to a number:
mr excel questions 25.xlsm
ABCDEFGHI
141600BANKNIFTY23APR41600CE11
241700BANKNIFTY23APR41700CE22
341800BANKNIFTY23APR41800CE33
441900BANKNIFTY23APR41900CE4180044333333
542000BANKNIFTY23APR42000CE4190055444444
642100BANKNIFTY23APR42100CE4200066555555
742200BANKNIFTY23APR42200CE77 
842300BANKNIFTY23APR42300CE4210088666666
942400BANKNIFTY23APR42400CE4220099777777
1042500BANKNIFTY23APR42500CE111 
1142600BANKNIFTY23APR42600CE42300222888888
1242700BANKNIFTY23APR42700CE42400333999999
1342800BANKNIFTY23APR42800CE444 
1442900BANKNIFTY23APR42900CE42500555111111111
1543000BANKNIFTY23APR43000CE42600666222222222
hsandeep
Cell Formulas
RangeFormula
A1:A15A1=MID(B1,LEN(B1)-6,5)
I4:I15I4=IFERROR(INDEX($E$1:$E$15,MATCH(C4,--MID($B$1:$B$15,15,5),0)),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
@awoohaw
That was a cool cow!...haw! ...it really woo me...it works, thanks awoohaw
 
Upvote 0
Happy to help. I'm glad the forum helped you find an answer.

Best wishes!
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

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