Popup if cetain part of cell is over a certain value

Bpuad

New Member
Joined
Feb 17, 2012
Messages
36
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I'm tring to create a popup i the last two figures in a cell is over a certain value.

the cell refered to contans 2 letters and 2 figures and I need only to refer to the two figures in the end e.g. IT14 in cell H16.

Now i found this VB scipt to be helpful creating the popup but I don't know how ust to refer to the last to (figures) in the cell, this code will only word if the cell cotains the 2 figures?

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("L16") > 16 Then
MsgBox "You have entered a value above 15"
End If
End Sub

I've tried to create another cell, pointing to H16, with a right formla to extract the last 2 figures but I don't seem to work either.

Regards,
Per
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Ofcause it should say e.g. IT14 in cell L16 (as in the VB script).
 
Upvote 0

Forum statistics

Threads
1,214,416
Messages
6,119,386
Members
448,891
Latest member
tpierce

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