Force to Negative Values

Willmonbo

Board Regular
Joined
May 16, 2010
Messages
141
I am dealing with a dataset that contains columns that will always be negative values, at times the person entering the data will in error type it as positive values, so i'd like to have VBA code that would force it to negative values so let's say Columns B, I, and P should always turn to negative even in the event the values were entered as positive.
 
you were right to assume that i'll have a header in row 1, so would this code start on row 2?

thank you for your help, and I'm sorry for the extra trouble I should have been clearer in my original description of what I needed.
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
you were right to assume that i'll have a header in row 1, so would this code start on row 2?
While the event code does not specifically "start" at Row 2, it should still work for you. The only time the code could screw up is if you put a number in your header instead of text, otherwise any non-numeric entry will be ignored, whether in the header or in the rest of the worksheet (within the specified columns, of course).
 
Upvote 0

Forum statistics

Threads
1,214,948
Messages
6,122,420
Members
449,083
Latest member
Ava19

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