Restricting the sign of an entry

SMARIE

New Member
Joined
Jan 4, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am trying to restrict the sign of the number a user can enter based on the sign of a different cell. For example, in the below, I want to restrict the user so that they can only enter a positive number in B1 since A1 is positive. In the same manner, they should only be able to enter a negative number in B2 since A2 is negative. Anyone have ideas?

1578177206966.png
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Use data validation. Set it up to restrict the user so he can only enter a number between 0 and the maximum number with that sign available in Excel. That number here I've used as 9.99 x 10^307

Like this:
 

Attachments

  • Annotation 2020-01-04 162204.jpg
    Annotation 2020-01-04 162204.jpg
    103.1 KB · Views: 12
Last edited:
Upvote 0
Using DRSteele's layout, you could also use this Custom Data Validation formula as well...

=OR(D4=0,SIGN(C4)=SIGN(D4))
 
Last edited:
Upvote 0
You're welcome, Marie. I'm glad to have helped.
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,677
Members
449,092
Latest member
tayo4dgacorbanget

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