Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default Format Columns

Hi,

i am trying to write a macro that converts a column's format from text to
numeric with no decimal places.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Format Columns

Columns(3).NumberFormat = "#"

But this will not affect any values that are stored as text.

Perhaps
Columns(3).NumberFormat = "#"
set rng = Range(cells(1,3),Cells(rows.count,3).end(xlup))
rng.Value = rng.Value

is what you want

--
Regards,
Tom Ogilvy

"Todd" wrote in message
...
Hi,

i am trying to write a macro that converts a column's format from text to
numeric with no decimal places.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Format Columns


I know to format a specific cell like that, you could use th
formatnumber() function. I'm new to this too, so I don't kno
specifics

--
Martin_Austi
-----------------------------------------------------------------------
Martin_Austin's Profile: http://www.excelforum.com/member.php...fo&userid=1638
View this thread: http://www.excelforum.com/showthread.php?threadid=27760

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
Format the columns 30 - 60 - 90 -120 JoeM[_3_] Excel Worksheet Functions 5 March 2nd 10 03:27 PM
conditional format columns Cerberus Excel Discussion (Misc queries) 1 August 11th 09 06:29 PM
Format and Align Columns TKM New Users to Excel 3 October 19th 06 06:06 PM
Format new Lines into Columns efenili Excel Worksheet Functions 1 May 16th 06 06:09 PM
Cycle thru & format all columns Arawn Excel Programming 4 November 19th 03 02:01 AM


All times are GMT +1. The time now is 07:18 PM.

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"