format cell to show zero if not a positive number

How can I format a column of figures to show that if the result is
zero or negative amount it will just show a zero or be left blank.
I am attempting to show the difference between figures that have been
invoiced to figures that have been added and thus need to be invoiced.
0
mumzee3 (29)
2/26/2008 7:03:53 PM
excel 39879 articles. 2 followers. Follow

6 Replies
703 Views

Similar Articles

[PageSpeed] 0

Use a custom format like

#,##0.00_);;

or

#,##0.00_);"0";"0"

HTH,
Bernie
MS Excel MVP


"TechnoGram" <mumzee3@hotmail.com> wrote in message 
news:4183a06c-5eb1-4699-9efd-fd8a4bdd4e07@d62g2000hsf.googlegroups.com...
> How can I format a column of figures to show that if the result is
> zero or negative amount it will just show a zero or be left blank.
> I am attempting to show the difference between figures that have been
> invoiced to figures that have been added and thus need to be invoiced. 


0
Bernie
2/26/2008 7:22:41 PM
On Feb 26, 11:22=A0am, "Bernie Deitrick" <deitbe @ consumer dot org>
wrote:
> Use a custom format like
>
> #,##0.00_);;
>
> or
>
> #,##0.00_);"0";"0"
>
> HTH,
> Bernie
> MS Excel MVP
>
> "TechnoGram" <mumz...@hotmail.com> wrote in message
>
> news:4183a06c-5eb1-4699-9efd-fd8a4bdd4e07@d62g2000hsf.googlegroups.com...
>
>
>
> > How can I format a column of figures to show that if the result is
> > zero or negative amount it will just show a zero or be left blank.
> > I am attempting to show the difference between figures that have been
> > invoiced to figures that have been added and thus need to be invoiced.- =
Hide quoted text -
>
> - Show quoted text -

Can I get a little more help on this.  Not sure how to enter the
suggestion in my worksheet.  Do I highlight the column and then have
to enter something??  Thanks
0
mumzee3 (29)
3/6/2008 5:56:27 PM
Select the cells that you want to format, then choose Format / Cells   and select "Custom" under 
category, and paste the string #,##0.00_);;  into the edit box under Type:

HTH,
Bernie
MS Excel MVP


"TechnoGram" <mumzee3@hotmail.com> wrote in message 
news:e0b899a4-8014-46e9-aeeb-7d2ab2e9d446@e25g2000prg.googlegroups.com...
On Feb 26, 11:22 am, "Bernie Deitrick" <deitbe @ consumer dot org>
wrote:
> Use a custom format like
>
> #,##0.00_);;
>
> or
>
> #,##0.00_);"0";"0"
>
> HTH,
> Bernie
> MS Excel MVP
>
> "TechnoGram" <mumz...@hotmail.com> wrote in message
>
> news:4183a06c-5eb1-4699-9efd-fd8a4bdd4e07@d62g2000hsf.googlegroups.com...
>
>
>
> > How can I format a column of figures to show that if the result is
> > zero or negative amount it will just show a zero or be left blank.
> > I am attempting to show the difference between figures that have been
> > invoiced to figures that have been added and thus need to be invoiced.- Hide quoted text -
>
> - Show quoted text -

Can I get a little more help on this.  Not sure how to enter the
suggestion in my worksheet.  Do I highlight the column and then have
to enter something??  Thanks 


0
Bernie
3/6/2008 6:47:47 PM
Highlight the cells where you want this to apply, then click on Format
| Cells | Number tab and then click Custom (at the bottom of the
list). You will see a panel under Type:, and it is here that you need
to enter the codes that Bernie has given you, i.e.:

#,##0.00_);;

This will show a blank if the cell content is zero or negative, but
positive numbers will be shown with 2 decimal places, or:

#,##0.00_);"0";"0"

will show 0 if the number is zero or negative. You might like to
change the "0" to "0.00" in this case if you want the number of
decimals to be the same throughout. As Bernie has put _) at the end of
the positive format, positive numbers are slightly indented to the
left, so you might like to change this or the -ve/zero formats to be
the same, i.e.:

#,##0.00_);"0.00"_);"0.00"_)

Hope this helps.

Pete

On Mar 6, 5:56=A0pm, TechnoGram <mumz...@hotmail.com> wrote:
> On Feb 26, 11:22=A0am, "Bernie Deitrick" <deitbe @ consumer dot org>
> wrote:
>
>
>
>
>
> > Use a custom format like
>
> > #,##0.00_);;
>
> > or
>
> > #,##0.00_);"0";"0"
>
> > HTH,
> > Bernie
> > MS Excel MVP
>
> > "TechnoGram" <mumz...@hotmail.com> wrote in message
>
> >news:4183a06c-5eb1-4699-9efd-fd8a4bdd4e07@d62g2000hsf.googlegroups.com...=

>
> > > How can I format a column of figures to show that if the result is
> > > zero or negative amount it will just show a zero or be left blank.
> > > I am attempting to show the difference between figures that have been
> > > invoiced to figures that have been added and thus need to be invoiced.=
- Hide quoted text -
>
> > - Show quoted text -
>
> Can I get a little more help on this. =A0Not sure how to enter the
> suggestion in my worksheet. =A0Do I highlight the column and then have
> to enter something?? =A0Thanks- Hide quoted text -
>
> - Show quoted text -

0
pashurst (2576)
3/6/2008 6:58:27 PM
On Mar 6, 10:58=A0am, Pete_UK <pashu...@auditel.net> wrote:
> Highlight the cells where you want this to apply, then click on Format
> | Cells | Number tab and then click Custom (at the bottom of the
> list). You will see a panel under Type:, and it is here that you need
> to enter the codes that Bernie has given you, i.e.:
>
> #,##0.00_);;
>
> This will show a blank if the cell content is zero or negative, but
> positive numbers will be shown with 2 decimal places, or:
>
> #,##0.00_);"0";"0"
>
> will show 0 if the number is zero or negative. You might like to
> change the "0" to "0.00" in this case if you want the number of
> decimals to be the same throughout. As Bernie has put _) at the end of
> the positive format, positive numbers are slightly indented to the
> left, so you might like to change this or the -ve/zero formats to be
> the same, i.e.:
>
> #,##0.00_);"0.00"_);"0.00"_)
>
> Hope this helps.
>
> Pete
>
> On Mar 6, 5:56=A0pm, TechnoGram <mumz...@hotmail.com> wrote:
>
>
>
> > On Feb 26, 11:22=A0am, "Bernie Deitrick" <deitbe @ consumer dot org>
> > wrote:
>
> > > Use a custom format like
>
> > > #,##0.00_);;
>
> > > or
>
> > > #,##0.00_);"0";"0"
>
> > > HTH,
> > > Bernie
> > > MS Excel MVP
>
> > > "TechnoGram" <mumz...@hotmail.com> wrote in message
>
> > >news:4183a06c-5eb1-4699-9efd-fd8a4bdd4e07@d62g2000hsf.googlegroups.com.=
...
>
> > > > How can I format a column of figures to show that if the result is
> > > > zero or negative amount it will just show a zero or be left blank.
> > > > I am attempting to show the difference between figures that have bee=
n
> > > > invoiced to figures that have been added and thus need to be invoice=
d.- Hide quoted text -
>
> > > - Show quoted text -
>
> > Can I get a little more help on this. =A0Not sure how to enter the
> > suggestion in my worksheet. =A0Do I highlight the column and then have
> > to enter something?? =A0Thanks- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Exactly what I was looking for and needed, with the addition of Pete
for future differences in how the numbers show.  Thank you both,
excellent help.  Must say however I had a bit of a heart stop when the
end result did not just magically appear after the custom format input
LOL silly me forgot to put the =3Dsum() formula in to generate the
answer......

0
mumzee3 (29)
3/6/2008 7:21:17 PM
Glad to be of help - thanks for feeding back.

Pete

On Mar 6, 7:21=A0pm, TechnoGram <mumz...@hotmail.com> wrote:
> On Mar 6, 10:58=A0am, Pete_UK <pashu...@auditel.net> wrote:
>
>
>
>
>
> > Highlight the cells where you want this to apply, then click on Format
> > | Cells | Number tab and then click Custom (at the bottom of the
> > list). You will see a panel under Type:, and it is here that you need
> > to enter the codes that Bernie has given you, i.e.:
>
> > #,##0.00_);;
>
> > This will show a blank if the cell content is zero or negative, but
> > positive numbers will be shown with 2 decimal places, or:
>
> > #,##0.00_);"0";"0"
>
> > will show 0 if the number is zero or negative. You might like to
> > change the "0" to "0.00" in this case if you want the number of
> > decimals to be the same throughout. As Bernie has put _) at the end of
> > the positive format, positive numbers are slightly indented to the
> > left, so you might like to change this or the -ve/zero formats to be
> > the same, i.e.:
>
> > #,##0.00_);"0.00"_);"0.00"_)
>
> > Hope this helps.
>
> > Pete
>
> > On Mar 6, 5:56=A0pm, TechnoGram <mumz...@hotmail.com> wrote:
>
> > > On Feb 26, 11:22=A0am, "Bernie Deitrick" <deitbe @ consumer dot org>
> > > wrote:
>
> > > > Use a custom format like
>
> > > > #,##0.00_);;
>
> > > > or
>
> > > > #,##0.00_);"0";"0"
>
> > > > HTH,
> > > > Bernie
> > > > MS Excel MVP
>
> > > > "TechnoGram" <mumz...@hotmail.com> wrote in message
>
> > > >news:4183a06c-5eb1-4699-9efd-fd8a4bdd4e07@d62g2000hsf.googlegroups.co=
m...
>
> > > > > How can I format a column of figures to show that if the result is=

> > > > > zero or negative amount it will just show a zero or be left blank.=

> > > > > I am attempting to show the difference between figures that have b=
een
> > > > > invoiced to figures that have been added and thus need to be invoi=
ced.- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > Can I get a little more help on this. =A0Not sure how to enter the
> > > suggestion in my worksheet. =A0Do I highlight the column and then have=

> > > to enter something?? =A0Thanks- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
>
> Exactly what I was looking for and needed, with the addition of Pete
> for future differences in how the numbers show. =A0Thank you both,
> excellent help. =A0Must say however I had a bit of a heart stop when the
> end result did not just magically appear after the custom format input
> LOL silly me forgot to put the =3Dsum() formula in to generate the
> answer......- Hide quoted text -
>
> - Show quoted text -

0
pashurst (2576)
3/6/2008 11:03:24 PM
Reply:

Similar Artilces:

negative number format
I have a report uploaded to excel from a particular program used here at work. In that program, negative numbers have the format of $###.00-, with the minus sign at the end instead of the beginning. When the data comes over to Excel the minus sign is still at the end of the number. The text currently has a General Format with No Specific Number Format. I have been manually moving the minus signs to the beginning in each cell, then changing the Column to Currency Number Format which is very time consuming. Is there a formula I can use in the Cell, Column and/or Worksheet containing...

Change date format to European format
My computer is set to European date format but Excel is default to American date format. Can someone advise how to change this default setting. Thanks, Scott Have you restarted Excel since setting the system date formatting? Excel takes its cue from the OS on launch. Also, double-check the Regional setting in the System Prefs. If those aren't the cause you'll need to be specific about your version & update levels of both Office & OS X plus any other details you can supply. -- HTH |:>) Bob Jones [MVP] Office:Mac "Scott" <NoSpam-Scot...

Formatting just some rows
Thank you so much for that, it'll save loadsa time. I adjusted the formula as the original sheet contined 11 columns of data. Can you help with this part now? The original sheet had dates in Column E (in the form Jan-03). Thay have come through on the new sheet in the single column as 5 digit figures such as 37622. Is there any way of getting the original form of the date back, affecting just rows 5, 16, 27 etc...of the new sheet? Perhaps I need to format just these rows on the NEW sheet. A similar problem exists with column I of the original where the � sign has been lost. Again is t...

freezing formatting
I would like to be able to "freeze" the formatting for the number of decimal places in cells - some will need to be integers, some will need three decimal places, etc. The problem comes when I paste in information; the number of decimal places I have formatted the cell for is overridden by the pasted-in data. Any ideas? On Fri, 24 Oct 2003 13:31:05 -0700, "H" <anonymous@discussions.microsoft.com> wrote: >I would like to be able to "freeze" the formatting for the number of decimal places in cells - some will need to be integers, some will need three de...

Question about format of reply and format of message
I have two questions about OL2003: 1. Word is set as default editor. In replying message, sometimes I will get extra lines on hitting Enter. It makes more space between paragraphs. Is there any way to insert one line with one Enter? 2. I'd like to have special effect in replying text message sometimes, such as change color of font, but it cannot be done unless changing the message format to be rich text or HTML. If I uncheck Word as default editor, there is an option in menu. What is it about with Word as editor? Thanks, Charles 1 - Check the paragraph spacing settings e...

Negative number formatting
Hi everyone, does anyone know how to do this? I hve a column of figures some positive and some negative. I want to format them so taht th negative numbers are expressed in (brackets) and also so that th column itself is decimal aligned, so even if I don't use decimal place the brackets "stick out". I know Word does this in tables, but I can' seem to make Excel do it. Help! Thanks, Vicky. :confused -- VickyJone ----------------------------------------------------------------------- VickyJones's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2448 ...

Enforce format
How can I "enforce" a format in a cell in excel so that it allows number entry only, i.e. it does not allow letters or any other characters. Thanks in advance. Keith Data Validation; custom formula; If active cell is A1, use this: =NOT(ISERROR(1*A1)) "Elfey1001" <Elfey1001@discussions.microsoft.com> wrote in message news:D744EEFC-3BD0-43A7-B673-F16107BBFA03@microsoft.com... > How can I "enforce" a format in a cell in excel so that it allows number > entry only, i.e. it does not allow letters or any other characters. > Thanks in advance. > Kei...

Format Smartlist field
Is it possible to format a smartlist field? Let's say from 2 decimals to 4 decimals? -- SmokyDuck This is only possible in SmartList Builder SmartLists, not in the 'out of the box' SmartLists. In SmartList Builder, you can click on the Display Name of a field, then click the blue arrow in the header to go to Set Field Options. For number fields there will be a tab called Decimal Places. -- Victoria Yudin Dynamics GP MVP Flexible Solutions, Inc. "Smokyduck" <Smokyduck@discussions.microsoft.com> wrote in message news:98223149-4092-484D-886D-F03A319319E...

Conditional Formating Help
Hi I wonder if anyone could help me, I am after code for the following. cell e6 = Keys Sent Column f6 = Keys due Column g6 = Keys received What I want the script to do is if there is no value in g6 and todays date is greater then the date stated in F6, then the cell turns red (prompt to inform me that keys are late). Many thanks Dan Use a CF formula of =AND(G6="",TODAY()>F6) HTH Bob "housinglad" <housinglad@discussions.microsoft.com> wrote in message news:A5887369-33DA-489A-BEC9-8173707313C6@microsoft.com... > Hi > ...

Custom patterns for cell shading
Hello, Is there a way to add 'custom patterns' to the cell shading option? I was hoping for a nice 'arrow pattern' for the conditional formatting. (I'm doing a presentation of traffic flow, and for flow north or south [ie if Northbound > Southbound, flow is northbound], I would like to graphically show the flow.) Any assistance or ideas would be greatly appreciated. I'm currently using windings arrows, but a form of pattern / conditional formatting would be awesome. Jools -- World of Warcraft *isn't* work? ...

Outlook 2003 unresponsive when viewing messages in HTML format.
About two weeks ago, I started Outlook and went in to view messages. On some messages, Outlook would appear to lock up and my harddrive light would come on continuously for a minute or more. The body of the message would appear as an empty window. We have discovered that the problem only occurs for email messages that are in HTML format. I can prevent the problem by going to: Tools > Options > Email Options and checking "Read all standard mail in plain text". When I have this option turned on, I can see a plain text version of the message. Unfortunately, much of ...

Select Case Conditional Formatting Sub?
I've tried to use the Sub below (Posted by Julie D I think) as a work around for more than three conditional formats and it works great IF I enter the data directly in the target cells. But, if the taget range is populated by a formula the color changes do not occur. Is there a way to modify this to work when the cells in the target range are formula driven? (Or, maybe I'm doing something wrong, any ideas?) Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Range("B6:B10")) Is Nothing...

Year series shows wrong in chart
Hi all : using Excel 2003, I have what should not even be a problem that I cannot solve. I have a series of years in a column, 1970-2006 to be exact, and these are the labels for my x axis. When I insert chart this appears as 1,2,3,...instead of 1970, 1971, etc. It doesn't matter how I format that column, text, general, custom, nothing works. Why is it not just giving me the data in the format that is actually there and how can I get it? thanks for any help Bevin B. Try first entering the dates as dates. To check to make sure they're entered as dates, after entering the data c...

named cells. need a 101
I've been building a 'what if' sheet that pulls in this and that from other sheets. All the sheets have named cells, as does the what if' sheet itself. I want to copy/replicate this sheet multiple times in the wb to allow for multiple and concurrent what if setups. I am worried about named resources (cells) and what's going to happen when I attempt this. I will experiment, but I'm worried about something getting picked up in the wrong place. Is there a good 101 out there that discusses the use of names and what to expect? Thank you. There was an earli...

Add opt. to change Printer-Friendly format to user defined format
This is a customer suggestion from Convergence. Customer would like to be able to have the option to change the Printer-Friendly format to a different/user defined format. 1. Employee enters a requisition. 2. Purchasing manager processes the Requisition: BP>Purchasing>Requisitions 3. Select a vendor and requisition. 3. User selects to view the requisition; Printer-Friendly Version opens. ISSUE: Currently, there are no options to define report format. For further inquiry- Customer Information: Jon Heseman, PC Administrator EFCO Systems 1800 N.E. Broadway Des Moines, Iowa...

Searching through DB Table containing Records in XML format
Guru's! Your time and guidance is much appreciated in this task that i am trying to get done. Background I have a SQL Server 2000 database table which contains 2 Fields (RecordID, XMLData (datatype=TEXT). There are about 10,000 records in this table. The Data in the field (XMLData) is a XML formatted string. (where F1,F2... are elements and v1, v2 is the data) <ControlRecord><F1>V1</F1><F2>V2</F2><F3>V3</F3><F4>V4</F4><F5>v5</F5><f6>v6 </f6>.....Upto 14 fields </ControlRecord> <ControlRecord><...

When copying from "date" cell to "general" cell, how to keep date.
An Excel question for you: when I try to copy data from a "date" formatted cell over to a concatenate formula in a "general" formatted field, it transfers the data over as the boolean value. This is causing endless headaches because I am trying to upload the information into our financial software. Do you know a solution for this? I think you mean the date comes over as the serial value. If not, this may not be right. In the concatenate function, embed the Text function. ex: A1 has 5/16/2004, B1 has "TEST" in it. C1 formula would be =concatenate (TEX...

How to format the value in a cell?
Hello! I wonder if excel has the function to format a value in cell without the help of Macro. To format a value,here I mean to correct the value automatically. For example,it need the value in a cell to be "T".But a user may enter " T","T ","t".The formatting function used here to trim the space at the begining or end of "T",or change the "t" to upper case. -------------------- An Try =TRIM(UPPER(A1)) -- Regards Roger Govier "An" <abc@sohu.com> wrote in message news:u%23Kg%23X6hFHA.576@tk2msftngp13.phx.gb...

Unlocking The Positioning Grid And Printing Question
Hello, Thanks for previous help. Using Excel 97. Two questions, please. a. Something new; never had showup before. On the page that has the data for a chart, I now have blue dashed lines showing, I guess, what the actual page boundaries would be if I printed this data. How do I get rid of this, and also the light grey "Page No.s" that also show up ? b. On my chart, I have some text boxes. They seem to be locked to a specific grid spacing limiting the exact spots I would like them to be. How can I remove this locking, and move them, smoothly, to "anywhere I'd li...

extracting data from one format to a different format...
I have a large database of company contacts that is formatted/entered as follows: ABC Company, Inc. John Doe 123 Main Street NE Des Moines, IA 52000 Phone: 123-456-7890 Fax: 098-765-4321 jdoe@abccompany.com Each line is in it's own cell, but I need it in column format such as follows: Company Name - First Name - Last Name - Address1 - Address2 - City - State - Zip - Phone - Fax - Email Any direction as to how I can easily do this? I'm using either 2003 or 2007 and have over 7,000 entries like this. PLEASE HELP as I don't want to spend hours into days try...

Stop macro if cell selected
Hi, First time & new to excel macros. I have a macro which copies data & inserts it into a viewable summary sheet which can be printed. The range is 6 cells & if cell k7 is selected I want to stop the macro. I have attempted to use IF command with Then End but it ignores it. Here is my macro: ' refence point to start pasting sequence Sheets("Alfa data").Select Range("C225").Select Application.CutCopyMode = False Selection.Copy Sheets("Sheet4").Select Range("c7").Select Selection.End(xlToRight).Select Acti...

Formatting numbers
Pub2002/XP - how to format numbers in a table - I want it to automatically space for thousands etc and align the numbers correctly ie. 1 650 243 500 etc You will have to do it manually, or copy and paste it from a spreadsheet. -- See if Courier font will do it. Most other fonts do proportional spacing i.e. the letter m is wider than an l. In Courier (maybe teletype, typewriter and a few other fonts) use the same width of space and thus will line up columns from row to row. -- Don Vancouver, USA, a great city in one of the 45+ countries in America! "simonh" <si...

Remove formatting from SSN
I exported some data from an Access database. The Social Security Numbers are in this format: 123-45-6789. I would like to change them all to 123456789. I've tried creating a Custom Format and formatting the cells, but nothing changed. Tried setting the format of a new column, then cutting and pasting or Paste Special into the new cells, but it keeps the old formatting. Is there an answer? Try this in a "helper" column: =TEXT(A1,"000000000") To retain your leading zeroes. -- HTH, RD ============================================== Please keep all corres...

Sheets lose formats
I have a file that I created by upgrading from Excel 2003. In 2007 the file saves fine. I had a user complain he didn't have Excel 2007 so I saved as a ..xls file and now everytime I reopen the file all my formating on every sheet is gone. If I reapply the formatting and then save as a .xlsm file, all the formatting stays in the file. Ideas? ...

Finding the Cell Reference for the minimum value of a data list.
I am trying to figure out how to automatically refernce a location of a cell (ex. C5)which has been calculated to be the minimum value of a set of data. If I can reference the row of this cell absolutely, then I want to use that value as the beginning data reference point for both the X and Y data values of an XY scatter plot. You can reference it using the MATCH function with INDEX or OFFSET: I.e., the starting cell might be referenced as: INDEX(C:C, MATCH(MIN(C:C),C:C, 0)) while the range to plot could be referenced as: OFFSET(C1,MATCH(MIN(C:C),C:C, 0)-1,0,numrows,numcol...