Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
C# programming - Getting number of last non-blank cell (column) in a row. | Excel Programming | |||
how do I convert a number to number of years, months and days | Excel Worksheet Functions | |||
convert text-format number to number in excel 2000%3f | Excel Discussion (Misc queries) | |||
convert decimal number to time : convert 1,59 (minutes, dec) to m | Excel Discussion (Misc queries) | |||
Excel97, VBA menu programming by ID Number. | Excel Programming |