How to detect the cell is contain "Euro" format?

Useful

Active Member
Joined
Mar 16, 2011
Messages
494
Hi mr Excel!
I have a question about macro.
How to detect that the formula contains value as euro format. and also after detecting that euro format then multiple them 5, if not euro then multiple 7


P.S :this code finds where is $ format
Cells.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=True).Activate
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi Give this a go.

Code:
For Each euroval In Range("b5:b12")                                      ' range to search
 
           If euroval.NumberFormat = "[$€-2] #,##0.00" Then
              euroval.Offset(0, 1).Value = (euroval.Value * 5)                      ' cell copied to
              euroval.Value = euroval.Offset(0, 1).Value
              euroval.Offset(0, 1).Delete
 
          Else
              euroval.Offset(0, 1).Value = (euroval.Value * 7)
              euroval.Value = euroval.Offset(0, 1).Value
              euroval.Offset(0, 1).Delete
 
         End If
 
Next euroval


regards


Kev
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,734
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top