Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
m m is offline
external usenet poster
 
Posts: 64
Default Find the first cell to contain text in a column

I have a column that contains empty cells and text. I want to return the
reference of the first cell in the column to contain text. For example

A2 = empty cell
A3 = empty cell
A4 = 2L

The formula would return A4

Thanks for your help

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Find the first cell to contain text in a column

Input this as an array (use Ctrl+Shift+Enter to confirm):
=ADDRESS(MIN(IF(ISTEXT(A2:A4),ROW(A2:A4),FALSE)),C OLUMN(A2),4)


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"M" wrote:

I have a column that contains empty cells and text. I want to return the
reference of the first cell in the column to contain text. For example

A2 = empty cell
A3 = empty cell
A4 = 2L

The formula would return A4

Thanks for your help

  #3   Report Post  
Posted to microsoft.public.excel.misc
m m is offline
external usenet poster
 
Posts: 64
Default Find the first cell to contain text in a column

Thanks luke This works

Is it posible to explain how?

Thanks again

"Luke M" wrote:

Input this as an array (use Ctrl+Shift+Enter to confirm):
=ADDRESS(MIN(IF(ISTEXT(A2:A4),ROW(A2:A4),FALSE)),C OLUMN(A2),4)


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"M" wrote:

I have a column that contains empty cells and text. I want to return the
reference of the first cell in the column to contain text. For example

A2 = empty cell
A3 = empty cell
A4 = 2L

The formula would return A4

Thanks for your help

  #4   Report Post  
Posted to microsoft.public.excel.misc
m m is offline
external usenet poster
 
Posts: 64
Default Find the first cell to contain text in a column

Also why do you have to use ctrl+shift+enter? I notice that this add {} to
either end but can't find out why??

"Luke M" wrote:

Input this as an array (use Ctrl+Shift+Enter to confirm):
=ADDRESS(MIN(IF(ISTEXT(A2:A4),ROW(A2:A4),FALSE)),C OLUMN(A2),4)


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"M" wrote:

I have a column that contains empty cells and text. I want to return the
reference of the first cell in the column to contain text. For example

A2 = empty cell
A3 = empty cell
A4 = 2L

The formula would return A4

Thanks for your help

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Find the first cell to contain text in a column

Ctrl + Shift + Enter is how an array function is entered in to a workbook.
For a really clear and useful explanation of arrays I would suggest the
following web site maintained by Chip Pearson an Excel MS MVP:

http://www.cpearson.com/excel/ArrayFormulas.aspx

I would also recommend that you peruse the Table of Contents on this site as
it has a treasure trove of information and how-to articles.

Hope this helps.
--
Kevin Backmann


"M" wrote:

Also why do you have to use ctrl+shift+enter? I notice that this add {} to
either end but can't find out why??

"Luke M" wrote:

Input this as an array (use Ctrl+Shift+Enter to confirm):
=ADDRESS(MIN(IF(ISTEXT(A2:A4),ROW(A2:A4),FALSE)),C OLUMN(A2),4)


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"M" wrote:

I have a column that contains empty cells and text. I want to return the
reference of the first cell in the column to contain text. For example

A2 = empty cell
A3 = empty cell
A4 = 2L

The formula would return A4

Thanks for your help



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Find the first cell to contain text in a column

It looks like Luke has gone so I'll explain how the formula works

first consider the formula to be in 3 parts and I've put a | in to show the
division between those parts


=ADDRESS(MIN(IF(ISTEXT(A2:A4),ROW(A2:A4),FALSE))|, COLUMN(A2)|,4)

which translates as

address(find the row,find the column,type of reference)

find the row

IF(ISTEXT(A2:A4),ROW(A2:A4),FALSE)

because it is array entered using CTRL+Shift +Enter this part of the formula
examines very row in the range of 4 cells and returns an array of row numbers
IF the row contains text. If all the cells contained text it would return

2;3;4

if only rows 2 and 4 contained text it would return 2;FALSE;4

we asked the formula to return the MIN of these so we now have a 2 for the row

The next part find the column

COLUMN(A2)

A2 is in column 1 so we now have the column and the formula is now effectively

=address(2,1,4) - put that in a cell and see what it returns

the number 4 means relative so the formula returns A2

change the 4 to a 1 and it would return $A$4

Mike



"M" wrote:

Also why do you have to use ctrl+shift+enter? I notice that this add {} to
either end but can't find out why??

"Luke M" wrote:

Input this as an array (use Ctrl+Shift+Enter to confirm):
=ADDRESS(MIN(IF(ISTEXT(A2:A4),ROW(A2:A4),FALSE)),C OLUMN(A2),4)


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"M" wrote:

I have a column that contains empty cells and text. I want to return the
reference of the first cell in the column to contain text. For example

A2 = empty cell
A3 = empty cell
A4 = 2L

The formula would return A4

Thanks for your help

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 73
Default Find the first cell to contain text in a column

I have a column that contains empty cells and text.

Try this:

=ADDRESS(MATCH("*",A:A,0),1,4)


--
Biff
Microsoft Excel MVP


"M" wrote:

I have a column that contains empty cells and text. I want to return the
reference of the first cell in the column to contain text. For example

A2 = empty cell
A3 = empty cell
A4 = 2L

The formula would return A4

Thanks for your help

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Find the first cell to contain text in a column

On Thu, 26 Feb 2009 10:01:05 -0800, M wrote:

I have a column that contains empty cells and text. I want to return the
reference of the first cell in the column to contain text. For example

A2 = empty cell
A3 = empty cell
A4 = 2L

The formula would return A4

Thanks for your help



This formula must be **array-entered**

=ADDRESS(MATCH(TRUE,ISTEXT(A:A),0),1,4)

To **array-enter** a formula, after entering
the formula into the cell or formula bar, hold down
<ctrl<shift while hitting <enter. If you did this
correctly, Excel will place braces {...} around the formula.
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maddening Dilemma - Compare each cell within column a to each cell in column b and find unique matches [email protected] Excel Worksheet Functions 66 May 1st 23 03:44 AM
Find a text from a column in a text string within another column? Mike Garcia[_2_] New Users to Excel 1 October 22nd 08 06:50 PM
Find cell address of last cell in a column with text mike in texas Excel Worksheet Functions 8 October 4th 08 05:41 AM
find common text in cell in column in sheet then return total amou leeona Excel Worksheet Functions 1 June 7th 08 04:43 AM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM


All times are GMT +1. The time now is 01:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"