pop up box if cell >90%

justvba

New Member
Joined
Jan 6, 2017
Messages
41
Hi I am trying to figure out how to make this work. In column "F" starting at row 5 the managers enter a sale price for an item. In Column "I" I have a formula that is put in by a macro that will tell them the % of discount they are giving. they click on a button and the macro runs and pull a bunch of data and fill in some formulas in the spread sheet. I have a message box that tell them to check for any Discount % in red.

What I want to do now is when they go back and adjust the sale price if it is still out of line I want a message box to pop up and say "no" I thought I could do this by using data Validation but can't get it to work correctly.

sale price = Column F
% Discount = Column I

column f looks at column I and if it is >90% or <0% a message box pops up.

Can anyone help me???
Excel 2016
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Try this:

In a hidden column, input the formula: =IF(OR(I5>90%,I5=0%,),"XXX","")
In this example, I put this formula into cell K5.


Then, create a worksheet level change and use the following VBA:


Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Address = "$F$5" Then
If Range("K5") = "XXX" Then

MsgBox "No", vbInformation, "Can't Do This"

Application.EnableEvents = False
Target.Value = ""
Application.EnableEvents = True

End If
End If


End Sub
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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