Excel - If, Count & Array
Asked By jun
23-Apr-08 12:28 AM
All
I have the following scenario
ADL PC NOTEBOOK IN-USE
MEL LCD 17 INCH SPARE
MEL PC NOTEBOOK IN-USE
MEL PC NOTEBOOK IN-USE
SYD PC DESKTOP SPARE
SYD PC NOTEBOOK IN-USE
I need to count how many in use, pc, notebooks, in syd. I'm thinking I
would use If, count and then an array to look over the range. I would like
it in either vba (just learning) or the easiest way to write the formula
I hope I have put enough details and explained myself
TIA
Bec
(it's grey and raining in Sydney, Aus)
Microsoft Excel
(1)
SUMPRODUCT
(1)
SYD
(1)
Aus
(1)
Bec
(1)
NOTEBOOK
(1)
ADL
(1)
LCD
(1)
pdberge replied...
Bec --
Try this:
=SUMPRODUCT(--(A1:A100="SYD"),--(B1:B100="PC"),--(C1:C100="NOTEBOOK IN-USE"))
Set the range to the right number of rows.
HTH
T. Valko replied...
Assuming you have 4 columns of data there:
=SUMPRODUCT(--(A1:A6="syd"),--(B1:B6="PC"),--(C1:C6="notebook"),--(D1:D6="in-use"))
Better if you use cells to hold the criteria:
J1 = syd
K1 = PC
L1 = notebook
M1 = in-use
=SUMPRODUCT(--(A1:A6=J1),--(B1:B6=K1),--(C1:C6=L1),--(D1:D6=M1))
--
Biff
Microsoft Excel MVP
Embed a 'match' statement in sumproduct? Excel Excel 2007 I am trying to help a coworker who wants to generate a few summary List of invalid product codes This formula works, but does not exclude the invalid products: = SUMPRODUCT(('Sheet 2'!$C$2:$C$60000 = 'Sheet 1'!$F7)*1, ('Sheet 2'!$I$2:$I I try to add a match statement, to exclude invalid products (multiply matches by zero): = SUMPRODUCT(('Sheet 2'!$C$2:$C$60000 = 'Sheet 1'!$F7)*1, ('Sheet 2'!$I$2:$I 0)*1) I cannot tell if there is a problem in my syntax, or if Sumproduct automatically thinks my match statement should be rows 2-60000 instead of 1-100, which it is not working how I'd expect. I welcome any suggestions! Thank you, Keith Excel Worksheet Discussions Microsoft Excel (1) Excel 2007 (1) SUMPRODUCT (1) ISERROR (1) MATCH (1) ISNA (1) Lifesavers (1
Filter in Microsoft Excel Excel Hi all, I am using microsoft excel 2000. I need help in filtering the data. I have two columns as below Name follows. b How we will define this filter. Please help me. . . . Thanx for reading. Robin Excel Worksheet Discussions Microsoft Excel (1) SUMPRODUCT (1) COUNTIF (1) OFFSET (1) COLUMN (1) VBA (1) À´ªàµà´¤àµ
Sumproduct Problem Excel = SUMPRODUCT(- -(M21:M5127 = "a")*(N21:N5127 = "f")*(L21:L5127 = "FALSE")) This formula does not work, but I think it should. Any suggestions? Thanks Excel Discussions Microsoft Excel (1) SUMPRODUCT (1) TEXT (1) Booleans (1) Insead (1) Are those Booleans in L21:L5127? If so you need to remove the quotes. Try one of these. . . For Boolean FALSE: = SUMPRODUCT(- -(M21:M5127 = "a"), - -(N21:N5127 = "f"), - -(L21:L5127 = FALSE)) For TEXT false: = SUMPRODUCT(- -(M21:M5127
Help with Excel Excel I have a spreadsheet with 3 columns - I want to know the number of times and col b = textb and col c = text c. how do I do this in excel? Excel Miscellaneous Discussions Microsoft Excel (1) Excel 2007 (1) Excel (1) SUMPRODUCT (1) COUNTIF (1) Bliengme (1) Times (1) Texta (1) = sumproduct(- -(a1:a10 = "texta
countif two corresponding cells meet the criteria Excel how do you countif . . . if range 1 = "A" and range 2 = "B" Excel Worksheet Discussions Microsoft Excel (1) Excel 2007 (1) Excel (1) SUMPRODUCT (1) COUNTIFS (1) Try one of these. All versions of Excel: = SUMPRODUCT(- -(A1:A10 = "A"), - -(B1:B10 = "B")) Excel 2007 only: = COUNTIFS(A1:A10, "A", B1