Searching down column and displaying value?

Aitch

Board Regular
Joined
Jan 27, 2019
Messages
119
Office Version
  1. 2010
Platform
  1. Windows
[TABLE="class: grid, width: 100, align: center"]
<tbody>[TR]
[TD]Tom[/TD]
[TD]Richard[/TD]
[TD]Harry[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Richard[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Harry[/TD]
[/TR]
</tbody>[/TABLE]


What formula do I put in the top row - which searches down that column for a non-empty cell, and displays the result?

I'm having no luck with the LOOKUP commands...

Thanks for the help!
 
Last edited:
I must be doing something wrong!

After I customise your formula it doesn't show SAME when there is more than 1 match?

=IF(INDEX(AK81:AK105,MATCH(MIN(IF((AK81:AK105<>""),$AM$81:$AM$105)),$AM$81:$AM$105,0))=0,"Same",INDEX(AK81:AK105,MATCH(MIN(IF((AK81:AK105<>""),$AM$81:$AM$105)),$AM$81:$AM$105,0))



Would there be a way to use your VLOOKUP formula above, to display 2 when there are 2 non-empty cells?
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Are your blank cells actually empty?
 
Upvote 0
They have an IF function which either shows the name or ""

I thought "" was considered empty by excel?
 
Upvote 0
If there is something in the cell then it's not "empty"
try
=IF(INDEX(AK81:AK105,MATCH(MIN(IF((AK81:AK105<>""),$AM$81:$AM$105)),$AM$81:$AM$105,0))="","Same",INDEX(AK81:AK105,MATCH(MIN(IF((AK81:AK105<>""),$AM$81:$AM$105)),$AM$81:$AM$105,0))
 
Upvote 0
I'm still having problems - which I'm sure is my fault lol!

I think making things simpler would be better for my level of understanding haha!


Is there a way to use your VLOOKUP formula from post 2 which displays the name if there is a non-empty cell
=VLOOKUP("*",A2:A11,1,0)

If there is more than one non-empty cell in the column, it display the number of non-empty cells?

Thanks again!

 
Upvote 0
How about
=IF(COUNTIF(A2:A6,"?*")>1,COUNTIF(A2:A6,"?*"),VLOOKUP("?*",A2:A6,1,0) )
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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