John_356
New Member
- Joined
- Jan 17, 2021
- Messages
- 26
- Office Version
- 365
- Platform
- Windows
Good day,
I'm building an automated tool for management/follow up/reporting purposes.
The company I'm managing from a distance is based in the Middle East and they have a different NumberFormat there, for example 2 000,00 i/o 2 000.00 - the difference being the "," and "." for decimal values.
For each formula my code defines a format, as per below example:
I would like to edit the last lane about the NumberFormat with an IF function based on a cell which will define the format; I'm thinking of a two item list like USA or Middle East with a title that says NumberFormat.
Should the information I've provided not sufficient please do not hesitate to ask.
Many thanks in advance for anybody who will spend any time on this regardless of success.
John
I'm building an automated tool for management/follow up/reporting purposes.
The company I'm managing from a distance is based in the Middle East and they have a different NumberFormat there, for example 2 000,00 i/o 2 000.00 - the difference being the "," and "." for decimal values.
For each formula my code defines a format, as per below example:
VBA Code:
Worksheets("S").Range("K2").Formula = "=IF(A2=A1,"""",IFNA(VLOOKUP($A2&"":""&K$1,T!$C:$J,8,FALSE),""""))"
Worksheets("S").Range("K2").AutoFill Worksheets("S").Range("K2:K" & LRS)
Worksheets("S").Columns("K"). _
NumberFormat = "#,##0.00_);[Red](#,##0.00)"
I would like to edit the last lane about the NumberFormat with an IF function based on a cell which will define the format; I'm thinking of a two item list like USA or Middle East with a title that says NumberFormat.
Should the information I've provided not sufficient please do not hesitate to ask.
Many thanks in advance for anybody who will spend any time on this regardless of success.
John