Numberformat in older versions of Excel

  • Thread starter Thread starter Oriana
  • Start date Start date
O

Oriana

I'm currently using numberformat extensively in an Excel
2002 spreadsheet that will be used worldwide. Half of my
users, though, run Excel 2000 and the spreadsheet seems to
bomb when it gets to the statement changing the
numberformat property. From what I gather this property
is unsupported in these earlier versions, is this correct?

I need to be able to adjust currencies (and their formats)
on the fly. Does anyone know how I can do this so that it
will work in Excel 2000? The format function looks like
it could work, but I'd rather set the format for a range,
rather than a value at a time.

Thanks,
Oriana.
 
Oriana,

Numberformat is a valid statement in Excel 2000. Perhaps you could
post your code to allow us to try it out.

HTH,
Bernie
 
Here's the code I've narrowed it down to. It works just
fine on Excel 2002, but seems to bomb on Excel 2000 (on
several different machines). Thanks in advance for any
insight offered.
-Oriana.

Sub Format_currency(sheetname, startrw, endrw)

'The following statement takes the number format from a
different worksheet based on the currency selected by the
user.
numform = Worksheets("rates").Range("A66").Value

rw = startrw
Do
'Sets several currency fields to display in the number
format for the chose currency.
Worksheets(sheetname).Cells(rw, 6).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 13).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 14).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 16).NumberFormat = numform
rw = rw + 1
Loop Until rw > endrw

End Sub
 
Oriana,

With a valid format string in cell A66 of sheet "Rates", your code
worked fine for mee in Excel 2000.

Valid format strings entered into a cell should look like this:

'[$?-2] #,##0.00

What is the content of cell A66?

HTH,
Bernie
 
The value of cell A66 varies, depending on the currency
selected. Some values that I know we're having problems
with are the following:

$###,###,##0.00
?###.###.##0,00

(Each machine is responsible for setting its own thousands
and decimal delimiters, so I'm not setting those here.)

Thanks for any help on this.
-Oriana.
-----Original Message-----
Oriana,

With a valid format string in cell A66 of sheet "Rates", your code
worked fine for mee in Excel 2000.

Valid format strings entered into a cell should look like this:

'[$?-2] #,##0.00

What is the content of cell A66?

HTH,
Bernie


Here's the code I've narrowed it down to. It works just
fine on Excel 2002, but seems to bomb on Excel 2000 (on
several different machines). Thanks in advance for any
insight offered.
-Oriana.

Sub Format_currency(sheetname, startrw, endrw)

'The following statement takes the number format from a
different worksheet based on the currency selected by the
user.
numform = Worksheets("rates").Range("A66").Value

rw = startrw
Do
'Sets several currency fields to display in the number
format for the chose currency.
Worksheets(sheetname).Cells(rw, 6).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 13).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 14).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 16).NumberFormat = numform
rw = rw + 1
Loop Until rw > endrw

End Sub


.
 
Oriana,

Neither of those strings produce an error for me using XL2000, though
the second one does give strangely formatted results, - 123 become
123..000

I don't know what else it could be.

Sorry that I can't be of more help.
Bernie
 
Hmmm, it looks like my reply to this post didn't go
through.

The current formats I'm using are:

$###,###,##0.00 and ?###.###.##0,00
-----Original Message-----
Oriana,

With a valid format string in cell A66 of sheet "Rates", your code
worked fine for mee in Excel 2000.

Valid format strings entered into a cell should look like this:

'[$?-2] #,##0.00

What is the content of cell A66?

HTH,
Bernie


Here's the code I've narrowed it down to. It works just
fine on Excel 2002, but seems to bomb on Excel 2000 (on
several different machines). Thanks in advance for any
insight offered.
-Oriana.

Sub Format_currency(sheetname, startrw, endrw)

'The following statement takes the number format from a
different worksheet based on the currency selected by the
user.
numform = Worksheets("rates").Range("A66").Value

rw = startrw
Do
'Sets several currency fields to display in the number
format for the chose currency.
Worksheets(sheetname).Cells(rw, 6).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 13).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 14).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 16).NumberFormat = numform
rw = rw + 1
Loop Until rw > endrw

End Sub


.
 
Oriana,

It did, and I replied:

Neither of those strings produce an error for me using XL2000, though
the second one does give strangely formatted results, - 123 become
123..000

I don't know what else it could be.

Sorry that I can't be of more help.
Bernie




--
HTH,
Bernie


Hmmm, it looks like my reply to this post didn't go
through.

The current formats I'm using are:

$###,###,##0.00 and ?###.###.##0,00
-----Original Message-----
Oriana,

With a valid format string in cell A66 of sheet "Rates", your code
worked fine for mee in Excel 2000.

Valid format strings entered into a cell should look like this:

'[$?-2] #,##0.00

What is the content of cell A66?

HTH,
Bernie


Here's the code I've narrowed it down to. It works just
fine on Excel 2002, but seems to bomb on Excel 2000 (on
several different machines). Thanks in advance for any
insight offered.
-Oriana.

Sub Format_currency(sheetname, startrw, endrw)

'The following statement takes the number format from a
different worksheet based on the currency selected by the
user.
numform = Worksheets("rates").Range("A66").Value

rw = startrw
Do
'Sets several currency fields to display in the number
format for the chose currency.
Worksheets(sheetname).Cells(rw, 6).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 13).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 14).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 16).NumberFormat = numform
rw = rw + 1
Loop Until rw > endrw

End Sub


.
 
Thanks very much anyway, Bernie. Really do appreciate it.

-Oriana.
-----Original Message-----
Oriana,

It did, and I replied:

Neither of those strings produce an error for me using XL2000, though
the second one does give strangely formatted results, - 123 become
123..000

I don't know what else it could be.

Sorry that I can't be of more help.
Bernie




--
HTH,
Bernie


Hmmm, it looks like my reply to this post didn't go
through.

The current formats I'm using are:

$###,###,##0.00 and ?###.###.##0,00
-----Original Message-----
Oriana,

With a valid format string in cell A66 of
sheet "Rates",
your code
worked fine for mee in Excel 2000.

Valid format strings entered into a cell should look
like
this:
'[$?-2] #,##0.00

What is the content of cell A66?

HTH,
Bernie


Here's the code I've narrowed it down to. It works just
fine on Excel 2002, but seems to bomb on Excel 2000 (on
several different machines). Thanks in advance for any
insight offered.
-Oriana.

Sub Format_currency(sheetname, startrw, endrw)

'The following statement takes the number format from a
different worksheet based on the currency selected by the
user.
numform = Worksheets("rates").Range("A66").Value

rw = startrw
Do
'Sets several currency fields to display in the number
format for the chose currency.
Worksheets(sheetname).Cells(rw, 6).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 13).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 14).NumberFormat = numform
Worksheets(sheetname).Cells(rw, 16).NumberFormat = numform
rw = rw + 1
Loop Until rw > endrw

End Sub




.


.
 
Back
Top