Declamatory
Active Member
- Joined
- Nov 6, 2014
- Messages
- 319
Good Day Everyone,
Is someone able to show me how to format cells in column H based on the text content in column C.
If part of the text in column C5 contains the text “GBP” then the format of H5 should be "$#,##0.00_);[Red]($#,##0.00)" (GBP currency format)
If part of the text in column C5 contains the text “USD” then the format of H5 should be "[$$-409]#,##0.00" (USD currency format)
The same rule should apply for all cells in column H. There will be some blank rows in the data. It doesn't matter how these cells are formatted as there is nothing in them.
I have tried using conditional formatting and this works fine when recording the macro but errors when running the macro. Is there another routine using VBA that would work.
Thanks
Dec
Is someone able to show me how to format cells in column H based on the text content in column C.
If part of the text in column C5 contains the text “GBP” then the format of H5 should be "$#,##0.00_);[Red]($#,##0.00)" (GBP currency format)
If part of the text in column C5 contains the text “USD” then the format of H5 should be "[$$-409]#,##0.00" (USD currency format)
The same rule should apply for all cells in column H. There will be some blank rows in the data. It doesn't matter how these cells are formatted as there is nothing in them.
I have tried using conditional formatting and this works fine when recording the macro but errors when running the macro. Is there another routine using VBA that would work.
Thanks
Dec