Fancy lookup formula!

ryansm05

Board Regular
Joined
Sep 14, 2016
Messages
148
Office Version
  1. 365
Platform
  1. Windows
Hi,

I need a formula that can look down entirety of Column B and identify all the blank cells that have a corresponding Ref number in column A.

The answer I would be looking for is in column D. Apologies for not attaching any files (company restriction prevents me form doing so).

If you can help it would be much appreciated.

Thanks,
Ryan.


[TABLE="width: 203"]
<colgroup><col width="64" style="width: 48pt;" span="2"> <col width="79" style="width: 59pt; mso-width-source: userset; mso-width-alt: 2816;"> <col width="64" style="width: 48pt;"> <tbody>[TR]
[TD="width: 64, bgcolor: #CCCCFF"]Ref (A)
[/TD]
[TD="width: 64, bgcolor: #CCCCFF"]Employee (B)
[/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"]Answer (D)
[/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#54482[/TD]
[TD="bgcolor: white"]1611400158[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: #CCCCFF"]#55066[/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#54490[/TD]
[TD="bgcolor: white"]1613033575[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: #CCCCFF"]#55070[/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#54752[/TD]
[TD="bgcolor: white"]1613046654[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: #CCCCFF"]#55072[/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#54844[/TD]
[TD="bgcolor: white"]1613075302[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: #CCCCFF"]#55075[/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#55066[/TD]
[TD="bgcolor: white"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: #CCCCFF"]#55076[/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#55067[/TD]
[TD="bgcolor: white"]1608229877[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: #CCCCFF"]#55083[/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#55070[/TD]
[TD="bgcolor: white"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: #CCCCFF"]#55103[/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#55072[/TD]
[TD="bgcolor: white"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#55075[/TD]
[TD="bgcolor: white"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#55076[/TD]
[TD="bgcolor: white"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#55083[/TD]
[TD="bgcolor: white"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: #CCCCFF"]#55103[/TD]
[TD="bgcolor: white"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try this, copied down.

00 Old HTML Conversions 2020-04-08 1.xlsm
ABCD
1Ref (A)Employee (B)Answer (D)
2#544821611400158#55066
3#544901613033575#55070
4#547521613046654#55072
5#548441613075302#55075
6#55066#55076
7#550671608229877#55083
8#55070#55103
9#55072 
10#55075 
11#55076 
12#55083
13#55103
List
Cell Formulas
RangeFormula
D2:D11D2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW(A$2:A$13)/((B$2:B$13="")*(A$2:A$13<>"")),ROWS(D$2:D2))),"")
 
Last edited:
Upvote 0
How about
=IFERROR(INDEX($A$2:$A$13,AGGREGATE(15,6,(ROW($A$2:$A$13)-ROW($A$2)+1)/($B$2:$B$13=""), ROWS(D$2:D2))),"")
 
Upvote 0
Try:

=IF(ROW()-1>ROWS($B$1:$B$13)-COUNTA($B$1:$B$13),"",INDEX($A$1:$A$13,SMALL(IF(LEN($A$1:$A$13&$B$1:$B$13)=LEN($A$1:$A$13),ROW($B$1:$B$13),ROWS($B$1:$B$13)+1),ROW()-1)))

Enter with Ctrl + Shift + Enter
 
Upvote 0
Thank you all! It worked a treat so I'm super chuffed with that. Have a great weekend.

Ryan
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0
Thank you all! It worked a treat so I'm super chuffed with that. Have a great weekend.

Ryan
You're welcome. :)


BTW, if your data is as uniform as your sample, here is an even shorter formula to do the job.

00 Old HTML Conversions 2020-04-08 1.xlsm
ABCD
1Ref (A)Employee (B)Answer (D)
2#544821611400158#55066
3#544901613033575#55070
4#547521613046654#55072
5#548441613075302#55075
6#55066#55076
7#550671608229877#55083
8#55070#55103
9#55072 
10#55075 
11#55076 
12#55083
13#55103
List
Cell Formulas
RangeFormula
D2:D11D2=IFERROR("#"&AGGREGATE(15,6,RIGHT(A$2:A$13,5)/(B$2:B$13=""),ROWS(D$2:D2)),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,787
Messages
6,180,950
Members
453,008
Latest member
GRTMAN

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