Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Tarburton
 
Posts: n/a
Default Making column reference in INDIRECT non-static

In those rare instances where I need to use indirect I sometimes point the
column reference to this, for example
=IF(QUOTIENT(COLUMN($C$2)-1,26)=0,"",CHAR(QUOTIENT(COLUMN($C$2)-1,26)+96))&CHAR(IF(MOD(COLUMN($C$2),26)=0,26,MOD(C OLUMN($C$2),26))+96)
which will return C, but change to D if a column is inserted.
Is there a shorter way to do this, some formula that will change back the 3
result of =COLUMN($C$2) back into a C?
(Forgive me for showing QUOTIENT(COLUMN($C$2)-1,26), I've already learned
from seeing Bob Phillips posts that INT((COLUMN($C$2)-1)/26) requires less
typing.)


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default Making column reference in INDIRECT non-static

Hi Bob

=CHAR(COLUMN($C$2)+64) will return uppercase C which I would have
thought would be preferable.
=CHAR(COLUMN($C$2)+96) will return lowercase c

But I was wondering what the formula is that would require you to do
this, and, whether there might not be a simpler way altogether?

--
Regards

Roger Govier


"Bob Tarburton" wrote in message
...
In those rare instances where I need to use indirect I sometimes point
the column reference to this, for example
=IF(QUOTIENT(COLUMN($C$2)-1,26)=0,"",CHAR(QUOTIENT(COLUMN($C$2)-1,26)+96))&CHAR(IF(MOD(COLUMN($C$2),26)=0,26,MOD(C OLUMN($C$2),26))+96)
which will return C, but change to D if a column is inserted.
Is there a shorter way to do this, some formula that will change back
the 3 result of =COLUMN($C$2) back into a C?
(Forgive me for showing QUOTIENT(COLUMN($C$2)-1,26), I've already
learned from seeing Bob Phillips posts that INT((COLUMN($C$2)-1)/26)
requires less typing.)



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete
 
Posts: n/a
Default Making column reference in INDIRECT non-static

Yes, you also need the Analysis Tool Pack to get QUOTIENT( ) whereas
INT( ) is a built-in function, readily available to everyone.

Pete

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Tarburton
 
Posts: n/a
Default Making column reference in INDIRECT non-static

Yes, I guess 64 is better than 96, however, I still need my big long formula
columns AA and on.

"Roger Govier" wrote in message
...
Hi Bob

=CHAR(COLUMN($C$2)+64) will return uppercase C which I would have thought
would be preferable.
=CHAR(COLUMN($C$2)+96) will return lowercase c

But I was wondering what the formula is that would require you to do this,
and, whether there might not be a simpler way altogether?

--
Regards

Roger Govier


"Bob Tarburton" wrote in message
...
In those rare instances where I need to use indirect I sometimes point
the column reference to this, for example
=IF(QUOTIENT(COLUMN($C$2)-1,26)=0,"",CHAR(QUOTIENT(COLUMN($C$2)-1,26)+96))&CHAR(IF(MOD(COLUMN($C$2),26)=0,26,MOD(C OLUMN($C$2),26))+96)
which will return C, but change to D if a column is inserted.
Is there a shorter way to do this, some formula that will change back the
3 result of =COLUMN($C$2) back into a C?
(Forgive me for showing QUOTIENT(COLUMN($C$2)-1,26), I've already learned
from seeing Bob Phillips posts that INT((COLUMN($C$2)-1)/26) requires
less typing.)





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Tarburton
 
Posts: n/a
Default Making column reference in INDIRECT non-static

Thanks for pointing out the additional advantage.

"Pete" wrote in message
oups.com...
Yes, you also need the Analysis Tool Pack to get QUOTIENT( ) whereas
INT( ) is a built-in function, readily available to everyone.

Pete



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
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Confusing VLOOKUP with Indirect reference Brian Excel Worksheet Functions 1 November 11th 05 12:03 AM
Indirect and Address in Reference to other sheets MikeDH Excel Worksheet Functions 0 August 11th 05 09:53 PM
How do I reference every "n" cell in a column in Excel? Alma Excel Worksheet Functions 2 March 22nd 05 06:19 PM
how to create a variable column in cell reference Sampson Excel Worksheet Functions 3 February 21st 05 10:13 PM


All times are GMT +1. The time now is 09:43 AM.

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"