Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Sumifs statemenet returns - , how to use in if statement?

I have a sumifs statement that totals lbs by customer and lot and date.
Sometimes it will return a value of 0 for certain date ranges. Later on in
the spreadsheet I divide by lbs and I dont want 0 lbs to return an error, so
I'm trying to put an if statement in to return 0 if lbs is 0, but I cannot
find a value that will work in the following....
=if(lbs=0,0,formula), I have also tried - which is what shows up in the lbs
column instead of 0, and I have tried "", "-", and "0". What value do i put
in my IF statement to match a 0 sumifs???
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Sumifs statemenet returns - , how to use in if statement?

OK, nevermind, brainfart which I figured out right after hitting post. I was
ending my IF statement before dividing by pounds instead of after
=IF(lbs=0,0,sumifs(etc...))/lbs
instead of
=IF(lbs=0,0,sumifs(etc....)/lbs)

What a difference a ) makes!

"Robbro" wrote:

I have a sumifs statement that totals lbs by customer and lot and date.
Sometimes it will return a value of 0 for certain date ranges. Later on in
the spreadsheet I divide by lbs and I dont want 0 lbs to return an error, so
I'm trying to put an if statement in to return 0 if lbs is 0, but I cannot
find a value that will work in the following....
=if(lbs=0,0,formula), I have also tried - which is what shows up in the lbs
column instead of 0, and I have tried "", "-", and "0". What value do i put
in my IF statement to match a 0 sumifs???

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 563
Default Sumifs statemenet returns - , how to use in if statement?

If I have a SUMIF formula in D1 and in F1 I want =45/D1 then I replace the
F1 formula by
=IF(D1=0,"X",45/D1) to avoid division by zero
The X can be replaced by anything or deleted leaving ""
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Robbro" wrote in message
...
I have a sumifs statement that totals lbs by customer and lot and date.
Sometimes it will return a value of 0 for certain date ranges. Later on
in
the spreadsheet I divide by lbs and I dont want 0 lbs to return an error,
so
I'm trying to put an if statement in to return 0 if lbs is 0, but I cannot
find a value that will work in the following....
=if(lbs=0,0,formula), I have also tried - which is what shows up in the
lbs
column instead of 0, and I have tried "", "-", and "0". What value do i
put
in my IF statement to match a 0 sumifs???


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
Return 0 when if statement with VLOOKUP returns#N/A stoz Excel Worksheet Functions 3 March 6th 09 03:41 AM
If statement returns zeros Rich D Excel Discussion (Misc queries) 5 December 15th 07 07:28 PM
If Statement returns true when false? Eric Excel Discussion (Misc queries) 3 September 11th 06 01:58 PM
nested if statement returns #value error [email protected] Excel Discussion (Misc queries) 3 August 10th 06 04:27 PM
Logic statement returns wrong answer. Tony Excel Worksheet Functions 2 December 2nd 04 05:07 AM


All times are GMT +1. The time now is 05:22 PM.

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"