Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default What programming to use in VBA to convert in to number?

Hi. I'm creating a macro and in the many things that it should do I need that
selects me a few cells and then convert the content into Number.

I can do it manually, but it seems that when I'm creating a macro it don'd
record that step.

What can I do????? Any special programming?

Regards,
Marco
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default What programming to use in VBA to convert in to number?

Hi,

You really haven't given a lot to go on but how about this for a start:

Sub stance()
Range("A1:A20").Select
For Each c In Selection
On Error Resume Next
c.Value = c.Value + 0
c.NumberFormat = "General"
Next
End Sub

Mike

"Marco" wrote:

Hi. I'm creating a macro and in the many things that it should do I need that
selects me a few cells and then convert the content into Number.

I can do it manually, but it seems that when I'm creating a macro it don'd
record that step.

What can I do????? Any special programming?

Regards,
Marco

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default What programming to use in VBA to convert in to number?

I think it works.

YOU A STAR.....


Cheers,
Marco



"Mike H" wrote:

Hi,

You really haven't given a lot to go on but how about this for a start:

Sub stance()
Range("A1:A20").Select
For Each c In Selection
On Error Resume Next
c.Value = c.Value + 0
c.NumberFormat = "General"
Next
End Sub

Mike

"Marco" wrote:

Hi. I'm creating a macro and in the many things that it should do I need that
selects me a few cells and then convert the content into Number.

I can do it manually, but it seems that when I'm creating a macro it don'd
record that step.

What can I do????? Any special programming?

Regards,
Marco

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default What programming to use in VBA to convert in to number?

Well I'm surprised and pleased in equal measure. Thanks for the feedback.

Mike

"Marco" wrote:

I think it works.

YOU A STAR.....


Cheers,
Marco



"Mike H" wrote:

Hi,

You really haven't given a lot to go on but how about this for a start:

Sub stance()
Range("A1:A20").Select
For Each c In Selection
On Error Resume Next
c.Value = c.Value + 0
c.NumberFormat = "General"
Next
End Sub

Mike

"Marco" wrote:

Hi. I'm creating a macro and in the many things that it should do I need that
selects me a few cells and then convert the content into Number.

I can do it manually, but it seems that when I'm creating a macro it don'd
record that step.

What can I do????? Any special programming?

Regards,
Marco

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
C# programming - Getting number of last non-blank cell (column) in a row. Paddy[_2_] Excel Programming 2 November 30th 05 10:39 PM
how do I convert a number to number of years, months and days because Excel Worksheet Functions 2 October 12th 05 06:15 PM
convert text-format number to number in excel 2000%3f Larry Excel Discussion (Misc queries) 1 July 29th 05 08:18 PM
convert decimal number to time : convert 1,59 (minutes, dec) to m agenda9533 Excel Discussion (Misc queries) 8 January 20th 05 10:24 PM
Excel97, VBA menu programming by ID Number. Bubu Excel Programming 1 November 16th 03 07:33 PM


All times are GMT +1. The time now is 11:29 AM.

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"