#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nso nso is offline
external usenet poster
 
Posts: 8
Default #VALUE!

i have formula '=G3-G2" in cell g4. when i dont have any info in g3 or g2,
g4 shows #VALUE!. is there somethin i can add to the formula so that if g2
and g3 are blank, g4 will be blank too?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default #VALUE!

One way, in G4: =IF(COUNT(G2:G3)<2,"",G3-G2)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"nso" wrote:
i have formula '=G3-G2" in cell g4. when i dont have any info in g3 or g2,
g4 shows #VALUE!. is there somethin i can add to the formula so that if g2
and g3 are blank, g4 will be blank too?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default #VALUE!

One way:

=IF(COUNT(G2:G3)<2,"",G3-G2)

--
Biff
Microsoft Excel MVP


"nso" wrote in message
...
i have formula '=G3-G2" in cell g4. when i dont have any info in g3 or g2,
g4 shows #VALUE!. is there somethin i can add to the formula so that if
g2
and g3 are blank, g4 will be blank too?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nso nso is offline
external usenet poster
 
Posts: 8
Default #VALUE!

i dont understand it but that worked, thanks!!

"Max" wrote:

One way, in G4: =IF(COUNT(G2:G3)<2,"",G3-G2)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"nso" wrote:
i have formula '=G3-G2" in cell g4. when i dont have any info in g3 or g2,
g4 shows #VALUE!. is there somethin i can add to the formula so that if g2
and g3 are blank, g4 will be blank too?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default #VALUE!

Welcome. The =IF(COUNT(G2:G3)<2,"", ... trap simply ensures that G2:G3
contain numbers before proceeding with the arithmetics between them. This
averts the #VALUE error which would result if G2:G3 were to contain text
such as null strings: "", returned by formulas
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"nso" wrote in message
...
i dont understand it but that worked, thanks!!



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



All times are GMT +1. The time now is 02:50 AM.

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

About Us

"It's about Microsoft Excel"