Urgent - make formula work with both decimal separators

S

staeri

I have a customer who has in my mind a strange request:

In cell A3 I have the formula =A1*A2

The value in A2 is always the same but the user is allowed to enter a
value in A1 and my customer wants to make the calculation in A3 work no
matter if the user enters a value with "." or "," as decimal separator.

As it is now if the user enters a value with the opposit decimal
separator compared to standard in A1 the result in A3 is ########.

How can I solve this?

Regards,

S
 
N

Niek Otten

=IF(ISERROR(FIND(",",A1)),A1,VALUE(SUBSTITUTE(A1,",",".")))

If your standard decimal separaor = ".", otherwise the other way around.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


|I have a customer who has in my mind a strange request:
|
| In cell A3 I have the formula =A1*A2
|
| The value in A2 is always the same but the user is allowed to enter a
| value in A1 and my customer wants to make the calculation in A3 work no
| matter if the user enters a value with "." or "," as decimal separator.
|
| As it is now if the user enters a value with the opposit decimal
| separator compared to standard in A1 the result in A3 is ########.
|
| How can I solve this?
|
| Regards,
|
| S
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top