Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Change Format of Entire Column

Hi Bill,

Columns("B:B").NumberFormat = "General"
Columns("Y:Y").NumberFormat = "General"

is one way.

Ken Johnson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default 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
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
Conditional format entire column JC Excel Worksheet Functions 3 June 30th 09 05:14 PM
change color of entire row by use conditional format Montu Excel Worksheet Functions 2 November 15th 07 10:02 AM
change first letter of a word for an entire column lori12844 Excel Discussion (Misc queries) 5 May 30th 07 06:06 AM
How to change style in one column only, not entire page Robert Kelley Excel Discussion (Misc queries) 2 October 31st 06 05:17 PM
Conditional Format to change entire row based on one cells data Crowbar via OfficeKB.com Excel Discussion (Misc queries) 2 October 25th 05 04:01 PM


All times are GMT +1. The time now is 05:06 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"