Extract Text From Column and Results To Another Cell

gr8whthunter76

New Member
Joined
Feb 16, 2021
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Using formulas I have narrowed results down from multiple columns to a single column. It all comes down to one column and in cells I16 to I24. If certain conditions are met it will return just one name in one of those cells. What I can't figure out is how to extract that one name and place it in cell h7. In idiot terms, search I16:I24 and if there is any text in any of those cells then put that text in h7. There will only be one name in that column so there is no need to worry if multiples in those cells. I keep getting the #spill! That is a new error to me. I wish I knew this stuff better. Normally I can piece together google searches to get, but not this one.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
How about:

VBA Code:
Sub FindText()
'
    Dim Cell    As Range
'
    For Each Cell In Range("I16:I24")                                   ' Check each cell in the range
        If Len(Cell.Value) > 0 Then Range("H7").Value = Cell.Value      '   If a non blank cell is found Then save the value to H7
    Next                                                                ' Loop back
End Sub
 
Upvote 0
Since only one cell will have text, I would suggest this formula (for your XL365 version)...

=CONCAT(I16:I24)
 
Upvote 0
Solution
How about:

VBA Code:
Sub FindText()
'
    Dim Cell    As Range
'
    For Each Cell In Range("I16:I24")                                   ' Check each cell in the range
        If Len(Cell.Value) > 0 Then Range("H7").Value = Cell.Value      '   If a non blank cell is found Then save the value to H7
    Next                                                                ' Loop back
End Sub
Holy Moses although you maybe right..........that is beyond my Excel knowledge to use VBA Code, my apologies!
 
Upvote 0
Since only one cell will have text, I would suggest this formula (for your XL365 version)...

=CONCAT(I16:I24)
That apparently is a function I need to read more on because that is not what I thought CONCAT did...........so easy now that I know. Thank you kind sir!!
 
Upvote 0
That apparently is a function I need to read more on because that is not what I thought CONCAT did...........so easy now that I know. Thank you kind sir!!
You are quite welcome. Another function related to CONCAT that you should look into it the TEXTJOIN function (it allows you to specify a delimiter for the concatenation).
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,249
Members
449,075
Latest member
staticfluids

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