Stumbleupon Facebook Twitter Digg Google Delicious Linkedin
TechNews

I think I need a macro of conditional formatting has been proven, but it doesn't give me the desired effect

Posted: 22 Feb 2012

Tags: I think I need a macro of conditional formatting has been proven but it doesnt give me the desired effect think need macro conditional formatting has been proven but doesnt give the desired effect


I think I need a macro of conditional formatting has been proven, but it doesn't give me the desired effect

Source: pragcap.com

Question:

Hello everybody,

I did a little research and I think I need a macro. I; ve tried conditional formatting but it doesn't give me the desired effect. This is.... I have a worksheet for the calculation of quotations, which may be in dollars or.

B11 contains a drop-down list that contains the following data validation, using (A12: C12)

EUR

GBP

$ USD

I want to apply the correct currency symbol to L32, I34 cells and prediction, based on the selection in B11

Logical hope, thanks in advance

Charlotte

Answer:

Brilliant! y in any event to run the macro without Ctrl + C? It would be great if just it when the drop-down list box is updated!


Hello

Yes you can do. Delete the code that I have given you.

Right click on the tab of the worksheet, display the code and paste this version of the code on the right. Close VB Editor. Now when you change the drop-down list format will change automatically

Private Sub Worksheet_Change(ByVal_Target_As_Range)
Dim nFrmt As String
Select the Range("B11") box
Case is = "EUR".
nFrmt = "-[$2] #, # 0.00"
Case is = "GBP".
nFrmt = "[$-809] #, # 0.00"
Case is = "$ $".
nFrmt = "[$ $-409] #, # 0.00"
Case Else
Select end
Range ("L32, I34, F37").NumberFormat = nFrmt
End Sub

Rate this article:


  • Pages:
  • 1

0 Comments

Add Your Comment !