Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Do not allow negative numbers in cell

How can I restrict entry of positive numbers in a cell using data validation?
In other words I want only to be able to enter numbers that are less than 0.

Thanks.
--
JNW
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Do not allow negative numbers in cell

Hi JNW,

You can easily restrict the entry of positive numbers in a cell using data validation in Microsoft Excel. Here are the steps:
  1. Select the cell or range of cells where you want to restrict the entry of positive numbers.
  2. Go to the Data tab in the ribbon and click on Data Validation.
  3. In the Data Validation dialog box, select "Custom" from the "Allow" drop-down list.
  4. In the "Formula" field, enter the following formula:
    Formula:
    =A1<
    (assuming the cell you selected is A1).
  5. Click on the Error Alert tab and enter a suitable error message, such as "Please enter a negative number".
  6. Click OK to close the Data Validation dialog box.

Now, if you try to enter a positive number in the selected cell or range of cells, you will see an error message and the entry will be rejected.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Do not allow negative numbers in cell

Data/ Validation/ Settings: Allow: Decimal/ less than/ 0
--
David Biddulph

"JNW" wrote in message
...
How can I restrict entry of positive numbers in a cell using data
validation?
In other words I want only to be able to enter numbers that are less than
0.

Thanks.
--
JNW



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Do not allow negative numbers in cell

Hey-

I found it. Select custom and if I am validating C3 the formula needs to be
=and(c3<0,isnumber(c3))

--
JNW


"JNW" wrote:

How can I restrict entry of positive numbers in a cell using data validation?
In other words I want only to be able to enter numbers that are less than 0.

Thanks.
--
JNW

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Do not allow negative numbers in cell

Much easier than mine!
--
JNW


"David Biddulph" wrote:

Data/ Validation/ Settings: Allow: Decimal/ less than/ 0
--
David Biddulph

"JNW" wrote in message
...
How can I restrict entry of positive numbers in a cell using data
validation?
In other words I want only to be able to enter numbers that are less than
0.

Thanks.
--
JNW






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Do not allow negative numbers in cell

Hope this helps...


Sub DelZeros()
For X = 1 To 1
Dim redRng As Range
Set redRng = Range("A1", Range("A100").End(xlUp))
For Each Cell In redRng
If Cell.Value <= 0 Then
Cell.Value = 0
End If
Next Cell
Next X
End Sub


--
RyGuy


"JNW" wrote:

How can I restrict entry of positive numbers in a cell using data validation?
In other words I want only to be able to enter numbers that are less than 0.

Thanks.
--
JNW

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2002 : Convert Positive Numbers to Negative Numbers ? Mr. Low Excel Discussion (Misc queries) 2 November 6th 06 03:30 PM
Set negative numbers to zero. Do not calculate with negative valu Excel Headache Excel Discussion (Misc queries) 4 September 14th 06 08:56 PM
change 2000 cells (negative numbers) into positive numbers lisbern Excel Worksheet Functions 2 August 16th 06 05:54 PM
Excel Formula - Add column of numbers but ignore negative numbers view for Distribution List members Excel Worksheet Functions 1 April 7th 06 03:13 AM
convert negative numbers to positive numbers and vice versa bill gras Excel Worksheet Functions 4 December 7th 05 01:39 AM


All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"