Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column conversion
How can I convert a column from alpha to numeric?
i.e. convert BZ to 78 Is there a simple conversion or do I have to write my own? I have data in cols A and B and BZ-CF. How would I say : Columns("B+1:BZ-1").Select Selection.Delete Shift:=xlToLeft |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column conversion
You can use a VBA function like
Function ColLetterToNumber(Letter As String) As Integer ColLetterToNumber = Worksheets(1).Range(Letter & "1").Column End Function -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Charlie" wrote in message ... How can I convert a column from alpha to numeric? i.e. convert BZ to 78 Is there a simple conversion or do I have to write my own? I have data in cols A and B and BZ-CF. How would I say : Columns("B+1:BZ-1").Select Selection.Delete Shift:=xlToLeft |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column conversion
Thanks
"Chip Pearson" wrote in message ... You can use a VBA function like Function ColLetterToNumber(Letter As String) As Integer ColLetterToNumber = Worksheets(1).Range(Letter & "1").Column End Function -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Charlie" wrote in message ... How can I convert a column from alpha to numeric? i.e. convert BZ to 78 Is there a simple conversion or do I have to write my own? I have data in cols A and B and BZ-CF. How would I say : Columns("B+1:BZ-1").Select Selection.Delete Shift:=xlToLeft |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column conversion
Charlie,
No need to convert: Range(Range("B:B").Offset(0, 1), Range("BZ:BZ").Offset(0, -1)).Select Selection.Delete Shift:=xlToLeft Simpler still is to use this, which will delete the columns where cellas in row 1 are blank: Range("1:1").SpecialCells(xlCellTypeBlanks).Entire Column.Delete HTH, Bernie MS Excel MVP "Charlie" wrote in message ... How can I convert a column from alpha to numeric? i.e. convert BZ to 78 Is there a simple conversion or do I have to write my own? I have data in cols A and B and BZ-CF. How would I say : Columns("B+1:BZ-1").Select Selection.Delete Shift:=xlToLeft |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column conversion
Thanks
"Bernie Deitrick" <deitbe @ consumer dot org wrote in message ... Charlie, No need to convert: Range(Range("B:B").Offset(0, 1), Range("BZ:BZ").Offset(0, -1)).Select Selection.Delete Shift:=xlToLeft Simpler still is to use this, which will delete the columns where cellas in row 1 are blank: Range("1:1").SpecialCells(xlCellTypeBlanks).Entire Column.Delete HTH, Bernie MS Excel MVP "Charlie" wrote in message ... How can I convert a column from alpha to numeric? i.e. convert BZ to 78 Is there a simple conversion or do I have to write my own? I have data in cols A and B and BZ-CF. How would I say : Columns("B+1:BZ-1").Select Selection.Delete Shift:=xlToLeft |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column conversion
Another one:
Range("C:BY").Delete -- Regards, Tom Ogilvy "Charlie" wrote in message ... Thanks "Chip Pearson" wrote in message ... You can use a VBA function like Function ColLetterToNumber(Letter As String) As Integer ColLetterToNumber = Worksheets(1).Range(Letter & "1").Column End Function -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Charlie" wrote in message ... How can I convert a column from alpha to numeric? i.e. convert BZ to 78 Is there a simple conversion or do I have to write my own? I have data in cols A and B and BZ-CF. How would I say : Columns("B+1:BZ-1").Select Selection.Delete Shift:=xlToLeft |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CSV Column Conversion | Excel Worksheet Functions | |||
Row to column conversion | Excel Discussion (Misc queries) | |||
Perpelexing Row to Column conversion | Excel Discussion (Misc queries) | |||
Excel Column and row conversion | Excel Discussion (Misc queries) | |||
How to use a conversion function in a whole column | Excel Programming |