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

Hi

Frank Kabel kindly helped me earlier with the following
code to save the workbook with a date stamp - it worked
the first time i ran this but keeps failing now with the
following error:

Compile error: Wrong number of arguments or invalid
property assignment!!

I have tried renaming the book before I run the macro but
this doesnt seem to do anything.

Also column L contains the data like the following:
1.6M
0.02M
2.5M

Where M stands for Million, i would like to convert this
to an actual figure - does anyone have any ideas?

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Format and Convert

Hi Edgar
what is the code you're using?

--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi

Frank Kabel kindly helped me earlier with the following
code to save the workbook with a date stamp - it worked
the first time i ran this but keeps failing now with the
following error:

Compile error: Wrong number of arguments or invalid
property assignment!!

I have tried renaming the book before I run the macro but
this doesnt seem to do anything.

Also column L contains the data like the following:
1.6M
0.02M
2.5M

Where M stands for Million, i would like to convert this
to an actual figure - does anyone have any ideas?

TIA

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Format and Convert

Hi

Sorry but the it looks like it was where the saveas
command was placed in my code that was causing the problem.

Any ideas on
Also column L contains the data like the following:
1.6M
0.02M
2.5M

Where M stands for Million, i would like to convert this
to an actual figure - does anyone have any ideas?

TIA

-----Original Message-----
Hi Edgar
what is the code you're using?

--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi

Frank Kabel kindly helped me earlier with the following
code to save the workbook with a date stamp - it worked
the first time i ran this but keeps failing now with the
following error:

Compile error: Wrong number of arguments or invalid
property assignment!!

I have tried renaming the book before I run the macro

but
this doesnt seem to do anything.

.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Format and Convert

Hi Edgar
just paste the code as it is in your workbook right now and post it in
this NG. Also idicate the exact line which causes the error

For your other question you may use the following formula:
=1000000*LEFT(A1,LEN(A1)-1)
and copy this down


--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi

Sorry but the it looks like it was where the saveas
command was placed in my code that was causing the problem.

Any ideas on
Also column L contains the data like the following:
1.6M
0.02M
2.5M

Where M stands for Million, i would like to convert this
to an actual figure - does anyone have any ideas?

TIA

-----Original Message-----
Hi Edgar
what is the code you're using?

--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi

Frank Kabel kindly helped me earlier with the following
code to save the workbook with a date stamp - it worked
the first time i ran this but keeps failing now with the
following error:

Compile error: Wrong number of arguments or invalid
property assignment!!

I have tried renaming the book before I run the macro but
this doesnt seem to do anything.

.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Format and Convert

Hi Frank

Sorry didnt make it clear - I fixed my problem saving.

Is it possible to convert the contents of the column as
described below in vba instead of a formula as it is part
of a big process?

Thanks so much


-----Original Message-----
Hi Edgar
just paste the code as it is in your workbook right now

and post it in
this NG. Also idicate the exact line which causes the

error

For your other question you may use the following formula:
=1000000*LEFT(A1,LEN(A1)-1)
and copy this down


--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi

Sorry but the it looks like it was where the saveas
command was placed in my code that was causing the

problem.

Any ideas on
Also column L contains the data like the following:
1.6M
0.02M
2.5M

Where M stands for Million, i would like to convert this
to an actual figure - does anyone have any ideas?

TIA

-----Original Message-----
Hi Edgar
what is the code you're using?

--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi

Frank Kabel kindly helped me earlier with the

following
code to save the workbook with a date stamp - it

worked
the first time i ran this but keeps failing now with

the
following error:

Compile error: Wrong number of arguments or invalid
property assignment!!

I have tried renaming the book before I run the macro

but
this doesnt seem to do anything.

.


.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Format and Convert

Hi
try the following: Select your cells and invoke the following macro

sub change_values()
Dim rng as range
Dim cell as range

set rng = selection
For each cell in rng
If cell.value<"" then
cell.value = cdbl(left(cell.value,len(cell.value)-1))*1000000
end if
next
end sub


--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi Frank

Sorry didnt make it clear - I fixed my problem saving.

Is it possible to convert the contents of the column as
described below in vba instead of a formula as it is part
of a big process?

Thanks so much


-----Original Message-----
Hi Edgar
just paste the code as it is in your workbook right now and post it
in this NG. Also idicate the exact line which causes the error

For your other question you may use the following formula:
=1000000*LEFT(A1,LEN(A1)-1)
and copy this down


--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi

Sorry but the it looks like it was where the saveas
command was placed in my code that was causing the problem.

Any ideas on
Also column L contains the data like the following:
1.6M
0.02M
2.5M

Where M stands for Million, i would like to convert this
to an actual figure - does anyone have any ideas?

TIA

-----Original Message-----
Hi Edgar
what is the code you're using?

--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi

Frank Kabel kindly helped me earlier with the following
code to save the workbook with a date stamp - it worked
the first time i ran this but keeps failing now with the
following error:

Compile error: Wrong number of arguments or invalid
property assignment!!

I have tried renaming the book before I run the macro but
this doesnt seem to do anything.

.


.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Format and Convert

Edgar,

For i = 1 To Cells(Rows.Count,"A").End(xlUp).Row
cells(i,"A").value =
left(cells(i,"A").Value,len(cells(i,"A").Value)-1)*1000000
Next i

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Edgar" wrote in message
...
Hi Frank

Sorry didnt make it clear - I fixed my problem saving.

Is it possible to convert the contents of the column as
described below in vba instead of a formula as it is part
of a big process?

Thanks so much


-----Original Message-----
Hi Edgar
just paste the code as it is in your workbook right now

and post it in
this NG. Also idicate the exact line which causes the

error

For your other question you may use the following formula:
=1000000*LEFT(A1,LEN(A1)-1)
and copy this down


--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi

Sorry but the it looks like it was where the saveas
command was placed in my code that was causing the

problem.

Any ideas on
Also column L contains the data like the following:
1.6M
0.02M
2.5M

Where M stands for Million, i would like to convert this
to an actual figure - does anyone have any ideas?

TIA

-----Original Message-----
Hi Edgar
what is the code you're using?

--
Regards
Frank Kabel
Frankfurt, Germany

Edgar wrote:
Hi

Frank Kabel kindly helped me earlier with the

following
code to save the workbook with a date stamp - it

worked
the first time i ran this but keeps failing now with

the
following error:

Compile error: Wrong number of arguments or invalid
property assignment!!

I have tried renaming the book before I run the macro

but
this doesnt seem to do anything.

.


.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Format and Convert

Edgar,

Is the error in the SaveAs line (it looks fine to me) or somewhere else?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Edgar" wrote in message
...
Hi

Frank Kabel kindly helped me earlier with the following
code to save the workbook with a date stamp - it worked
the first time i ran this but keeps failing now with the
following error:

Compile error: Wrong number of arguments or invalid
property assignment!!

I have tried renaming the book before I run the macro but
this doesnt seem to do anything.

Also column L contains the data like the following:
1.6M
0.02M
2.5M

Where M stands for Million, i would like to convert this
to an actual figure - does anyone have any ideas?

TIA



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
from date format convert to text format is wrong nooris Excel Discussion (Misc queries) 2 February 4th 10 03:41 PM
How to convert german format numbers to british format boysie Excel Discussion (Misc queries) 3 March 8th 08 06:27 PM
Convert European Date format to American Format Albert Excel Discussion (Misc queries) 3 August 21st 07 10:02 PM
Convert numbers from text format to number format merlin68 Excel Discussion (Misc queries) 7 June 20th 07 07:03 PM
How can I convert a date format to an ISO week format (in EXCEL)? ELI Excel Discussion (Misc queries) 2 July 6th 05 06:31 PM


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