Pull First Text Value in a Column

CrushFabrication

New Member
Joined
Jun 20, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello all -

I hope everyone is doing well and thank you to everyone who contributes to this fantastic community. I have been saved by you all's wisdom and expertise many times over the years, but I finally have a need where I can't find a solution already defined on the forum.

I have a table (T1) of data that is populated by pulling data from an accompanying raw data table (T2) via a series of IF statements. Due to this, every cell in T1 technically has a value even though many cells are displaying as blank because the IF statements are returning "". I need a formula that will scan the column and return the first non "" value in the column (but still be able to pull 0 values). I've found numerous solutions that look to pull the first non-blank value, but unfortunately it's returning "" because every cell in the column is technically not blank. :(

I hope this is making sense, but happy to provide more information if it doesn't.

Here are some of the solutions I've found that are close, but still pull "" values first rather than the first cell actually displaying text. Any ideas?

Excel Formula:
=XLOOKUP("*",C5:C16,C5:C16,,2)

=INDEX(C5:C16,MATCH("*",C5:C16,0))

=INDEX(C5:C16,1,MATCH(1,INDEX(1-ISBLANK(C5:C16),1,0),0)
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
This might not be possible, but is there a way to modify the formula to pull the second, or third, or fourth, etc. text value in the row rather than the first?
 
Upvote 0
Another option. Change the 2 to get the nth non-empty string value.
Excel Formula:
=INDEX(FILTER(C5:C16,C5:C16<>""),2)
 
Upvote 1

Forum statistics

Threads
1,222,112
Messages
6,163,992
Members
451,867
Latest member
csktwyr

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