Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Format of Entire Column
I have imported our loan transfer file over the internet. For some reason
two columns "B" and "Y" come in all messed up. The column should contain an Integer, however for some reason it can show as anything, but mostly different Date Formats. I noticed That when I clicked on the Column and changed the Column Format to General, all of the transferred numbers displayed correctly. The manager wants me to do it programmically and does not want anyone to do it manually. I know Visual Basic fairly well, but this is the first time (believe it or not) that I have ever used Excel. I purchased a couple of Excel books (Both Microsoft Press) but they do not show how to change a column, just individual cells and/or rows. I would appreciate if someone who knows can get me started with some script as to how to do this. Any help will be really appreciated. Thanks a Lot Bill |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Format of Entire Column
Hi Bill,
Columns("B:B").NumberFormat = "General" Columns("Y:Y").NumberFormat = "General" is one way. Ken Johnson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Format of Entire Column
Ken;
Thanks for getting back to me! I am getting a 13 Error Type Mismatch. Here is the code I inserted! Application.Goto Reference:="mcrFixColumnB" Columns("B.B").NumberFormat = "General" ChDir "C:\FirstNM" Application.Run "march06wA.csv!mcrFixColumnB" End Sub Is this correct? If it is what do we try next? "Ken Johnson" wrote: Hi Bill, Columns("B:B").NumberFormat = "General" Columns("Y:Y").NumberFormat = "General" is one way. Ken Johnson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Format of Entire Column
Ken;
I also tried Thanks for getting back to me! Same Error! Getting a 13 Error Type Mismatch. Here is the code I inserted! Application.Goto Reference:="mcrFixColumnB" Columns("B.B").NumberFormat = "0" ChDir "C:\FirstNM" Application.Run "march06wA.csv!mcrFixColumnB" End Sub Is this correct? If it is what do we try next? "Bill Barber" wrote: Ken; Thanks for getting back to me! I am getting a 13 Error Type Mismatch. Here is the code I inserted! Application.Goto Reference:="mcrFixColumnB" Columns("B.B").NumberFormat = "General" ChDir "C:\FirstNM" Application.Run "march06wA.csv!mcrFixColumnB" End Sub Is this correct? If it is what do we try next? "Ken Johnson" wrote: Hi Bill, Columns("B:B").NumberFormat = "General" Columns("Y:Y").NumberFormat = "General" is one way. Ken Johnson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Format of Entire Column
Use a semicolon rather than a period:
Columns("B:B").NumberFormat = "General" rather than Columns("B.B").NumberFormat = "General" -- Regards, Tom Ogilvy "Bill Barber" wrote in message ... Ken; I also tried Thanks for getting back to me! Same Error! Getting a 13 Error Type Mismatch. Here is the code I inserted! Application.Goto Reference:="mcrFixColumnB" Columns("B.B").NumberFormat = "0" ChDir "C:\FirstNM" Application.Run "march06wA.csv!mcrFixColumnB" End Sub Is this correct? If it is what do we try next? "Bill Barber" wrote: Ken; Thanks for getting back to me! I am getting a 13 Error Type Mismatch. Here is the code I inserted! Application.Goto Reference:="mcrFixColumnB" Columns("B.B").NumberFormat = "General" ChDir "C:\FirstNM" Application.Run "march06wA.csv!mcrFixColumnB" End Sub Is this correct? If it is what do we try next? "Ken Johnson" wrote: Hi Bill, Columns("B:B").NumberFormat = "General" Columns("Y:Y").NumberFormat = "General" is one way. Ken Johnson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Format of Entire Column
Sorry Bill, I was away from the computer.
I trust Tom's fixed it up. Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional format entire column | Excel Worksheet Functions | |||
change color of entire row by use conditional format | Excel Worksheet Functions | |||
change first letter of a word for an entire column | Excel Discussion (Misc queries) | |||
How to change style in one column only, not entire page | Excel Discussion (Misc queries) | |||
Conditional Format to change entire row based on one cells data | Excel Discussion (Misc queries) |