Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 191
Default formula for column letters

I need to copy/paste a sheet from one area to another sheet. I want to mark
the columns as the letters where they were before movement. I can make the
formula

="["&CHAR(64+COLUMN(Z1)-1)&"]"

to get up to column Z (the "-1" is because I've moved the columns over by
one to the right...so the B column, I need to show as A, but this is a minor
point). I cannot get this formula tweaked to where it will serve A-Z AND AA
and beyond (since the CHAR does not recognize AA as the next logical step).

Any help? Guessing it's an if/then, but not sure how.
--
Boris
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 903
Default formula for column letters

see my page http://www.mvps.org/dmcritchie/excel/join.htm
look for the macro MarkCells
---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"BorisS" wrote in message ...
I need to copy/paste a sheet from one area to another sheet. I want to mark
the columns as the letters where they were before movement. I can make the
formula

="["&CHAR(64+COLUMN(Z1)-1)&"]"

to get up to column Z (the "-1" is because I've moved the columns over by
one to the right...so the B column, I need to show as A, but this is a minor
point). I cannot get this formula tweaked to where it will serve A-Z AND AA
and beyond (since the CHAR does not recognize AA as the next logical step).

Any help? Guessing it's an if/then, but not sure how.
--
Boris



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default formula for column letters

Hi Boris

=IF(COLUMN(A1)26,
CHAR(INT(COLUMN(A1)/26)+64)&CHAR(MOD(COLUMN(A1),26)+64),
CHAR(COLUMN(A1)+64))

will deal with column letters going beyond 26 (column Z)
Adapt to suit your needs within your formula


--
Regards

Roger Govier


"BorisS" wrote in message
...
I need to copy/paste a sheet from one area to another sheet. I want to
mark
the columns as the letters where they were before movement. I can
make the
formula

="["&CHAR(64+COLUMN(Z1)-1)&"]"

to get up to column Z (the "-1" is because I've moved the columns over
by
one to the right...so the B column, I need to show as A, but this is a
minor
point). I cannot get this formula tweaked to where it will serve A-Z
AND AA
and beyond (since the CHAR does not recognize AA as the next logical
step).

Any help? Guessing it's an if/then, but not sure how.
--
Boris



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 208
Default formula for column letters

="[" & SUBSTITUTE( ADDRESS( 1, COLUMN( A1 ), 4 ), "1", "]" )

--
Regards,
Luc.

"Festina Lente"


"Roger Govier" wrote:

Hi Boris

=IF(COLUMN(A1)26,
CHAR(INT(COLUMN(A1)/26)+64)&CHAR(MOD(COLUMN(A1),26)+64),
CHAR(COLUMN(A1)+64))

will deal with column letters going beyond 26 (column Z)
Adapt to suit your needs within your formula


--
Regards

Roger Govier


"BorisS" wrote in message
...
I need to copy/paste a sheet from one area to another sheet. I want to
mark
the columns as the letters where they were before movement. I can
make the
formula

="["&CHAR(64+COLUMN(Z1)-1)&"]"

to get up to column Z (the "-1" is because I've moved the columns over
by
one to the right...so the B column, I need to show as A, but this is a
minor
point). I cannot get this formula tweaked to where it will serve A-Z
AND AA
and beyond (since the CHAR does not recognize AA as the next logical
step).

Any help? Guessing it's an if/then, but not sure how.
--
Boris




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
Find value in array Brook6 Excel Worksheet Functions 26 January 30th 07 09:40 PM
Is it possible? DakotaNJ Excel Worksheet Functions 25 September 18th 06 09:30 PM
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
formula for changing CAPS to small letters Stilla Excel Worksheet Functions 2 June 26th 06 07:07 PM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM


All times are GMT +1. The time now is 02:45 AM.

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"