I have two columns that I need to do a validation on.
Column O is the Cost of the Item with freight
Column S is the cost of Self Assessed HST 8%
The client keys in each of the following columns. I attached a small pictorial of my spreadsheet to give you a better picture of what I am talking about.
Column O is the Cost of the Item with freight
Column P is Freight
Column Q is GST
Column R is HST 8%
Column S is the cost of Self Assessed HST 8%
Column T is PST
Whenever the person keys in the value in column S I have to make sure that the amount is less than or equal to 8% of the Cost with freight (Column O). I identified these two columns in my spreadsheet pictorial. Currently I am doing this coding with data validation code. But the client can enter positive or negative values so how can I change my data validation logic to also include negative values. I was going to code this in the WORKSHEET_CHANGE in my macro but I understood that if you are not validating against another keyed input field then you had to do your logic with the DATA VALIDATION. Here is what I currently have for code. I am currently looking on the internet for a possible idea. Right now I am looking at defining a complicated if statement to take into account both my negative an positive conditionals. Any advice would be greatly appreciated. I had changed the coding to use absolute values but then how do I make sure if the cost of the item with freight is negative then I make sure they key in a negative amount. Here is my current data validation formula code.
Bookmarks