VBA Checking between two decimals

ChippyWeek

New Member
Joined
Oct 8, 2016
Messages
3
I have to check whether specified column's decimals are 0 or higher and smaller than a decimal from different column and one row above the current cell. Here's a picture. What would be correct way to make this using VBA?
mQy67Rg.png
 

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.
We can handle this different ways. Your rules are clear...C4>0 and C4>E3. But I don't understand the "what to do" if that's true. If all we want to do is flag the issue, this could be handled by an if statement...for example, insert a column at F:F, and set F4 with
Code:
=IF(AND(C4>0,C4>E3),"WARNING!","")
VBA would be useful if we wanted to do something much more specific that can't be handled with formulas....like output all the rows where there's an issue on another sheet, for example.
 
Upvote 0

Forum statistics

Threads
1,203,242
Messages
6,054,350
Members
444,718
Latest member
r0nster

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