#1   Report Post  
Posted to microsoft.public.excel.misc
Lee
 
Posts: n/a
Default Need another formula

Ok, I'm using the formula =SUMIF(B1,"=X",A1) to show the value of cell A1
only if cell B1 has an "X". I want to include the value of 2 other cells
along with cell A1 but only if cell B1 has the "X".
--
Lee Davenport
  #2   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Need another formula

"Lee" wrote:
Ok, I'm using the formula =SUMIF(B1,"=X",A1) to show
the value of cell A1 only if cell B1 has an "X".


First, why would you use SUMIF() for this purpose? That's
like "killing an ant with a sledgehammer". Why not simply
one of the following?

=if(B1 = "X", A1, 0)
=(B1 = "X")*A1

I want to include the value of 2 other cells along with cell
A1 but only if cell B1 has the "X".


Will one of the following fit the bill?

=if(B1 = "X", sum(A1:A3), 0)
=if(B1 = "X", A1+A3+A5, 0)
=(B1 = "X")*sum(A1:A3)
=(B1 = "X")*(A1+A3+A5)
  #3   Report Post  
Posted to microsoft.public.excel.misc
Lee
 
Posts: n/a
Default Need another formula

Thanks. That worked perfectly.
--
Lee Davenport


" wrote:

"Lee" wrote:
Ok, I'm using the formula =SUMIF(B1,"=X",A1) to show
the value of cell A1 only if cell B1 has an "X".


First, why would you use SUMIF() for this purpose? That's
like "killing an ant with a sledgehammer". Why not simply
one of the following?

=if(B1 = "X", A1, 0)
=(B1 = "X")*A1

I want to include the value of 2 other cells along with cell
A1 but only if cell B1 has the "X".


Will one of the following fit the bill?

=if(B1 = "X", sum(A1:A3), 0)
=if(B1 = "X", A1+A3+A5, 0)
=(B1 = "X")*sum(A1:A3)
=(B1 = "X")*(A1+A3+A5)

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
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
2 Nesting questions Starchaser Excel Worksheet Functions 7 January 20th 06 06:53 PM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


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

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"