#1   Report Post  
Jeff
 
Posts: n/a
Default Column Reference

Hi,

On Row 3 - I have text from columns "B3:J3".

I am constanly adding and clrearing the rightmost cell, so that the last
column is J, P, K, ...etc.

Is there any way to create a function in Cell A1 so that it will give me the
letter of the rightmost column with text (whichever is nonempty). - (I am
using this with the indirect function to do a vlookup)

So if the text spans from column B to column AJ - then Cell A1 = AJ
If text spans to column K, Cell A1= K

Any help would be greatly appreciated.
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=LEFT(ADDRESS(1,COUNTA(B3:IV3)+1,4,TRUE), 1+(COUNTA(B3:IV3)25))


In article ,
"Jeff" wrote:

Hi,

On Row 3 - I have text from columns "B3:J3".

I am constanly adding and clrearing the rightmost cell, so that the last
column is J, P, K, ...etc.

Is there any way to create a function in Cell A1 so that it will give me the
letter of the rightmost column with text (whichever is nonempty). - (I am
using this with the indirect function to do a vlookup)

So if the text spans from column B to column AJ - then Cell A1 = AJ
If text spans to column K, Cell A1= K

Any help would be greatly appreciated.

  #3   Report Post  
Don Guillett
 
Posts: n/a
Default

You could use
=match("zzzzzzzzzzzzzzzzz",1:1) to give the answer 4 if the last column was
D
but why not just use a defined name for the range instead so that it is self
adjusting
insertnamedefinename it myrange or whatever
in the refers to box use the offset function (look in help index for more
info)
=offset($a$2,0,0,counta($a:$a),counta(1:1)) or similar

--
Don Guillett
SalesAid Software

"Jeff" wrote in message
...
Hi,

On Row 3 - I have text from columns "B3:J3".

I am constanly adding and clrearing the rightmost cell, so that the last
column is J, P, K, ...etc.

Is there any way to create a function in Cell A1 so that it will give me

the
letter of the rightmost column with text (whichever is nonempty). - (I am
using this with the indirect function to do a vlookup)

So if the text spans from column B to column AJ - then Cell A1 = AJ
If text spans to column K, Cell A1= K

Any help would be greatly appreciated.



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
How do I sort by row instead of by column? PercivalMound Excel Worksheet Functions 7 August 28th 06 10:41 PM
Formula to reference column heading JimDandy Excel Worksheet Functions 2 November 19th 04 05:48 AM
Formula to reference column heading JimDandy Excel Worksheet Functions 1 November 17th 04 04:06 PM
Copying the contents of a column into a chart Richard Excel Worksheet Functions 1 November 16th 04 02:39 PM
compacting UPPER/LOWER & column reference Pantryman Excel Worksheet Functions 1 October 29th 04 10:07 PM


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

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

About Us

"It's about Microsoft Excel"