Excel. Double the number in cell A7, IF all cells from A1 through A6 contain a value higher than 0.
I am trying to make an excel timesheet where Employees who work on Sunday get paid at double their hourly rate. HOWEVER, in order for them to get this double rate they MUST have worked all of the previous 6 days. (i.e Monday to Saturday) Otherwise they just get the usual hourly rate.
Got myself rather confused!! Any pointers please?!!!
COUNTonly counts numbers, not text.” True. // “No need forCOUNTIF––COUNT()can be used, as in=IF(COUNT(A1:A6)=6, …). False. Zero is a number. IfA1:A6contains { 8, 8, 8, 8, 8, 0 },COUNT(A1:A6)is 6, and timesheets often contain zeroes. – Scott - Слава Україні Feb 01 '13 at 22:19=IF(PRODUCT(A1:A6)>0, …)would work if we were guaranteed that all six cells have numbers in them –– butPRODUCT(A1:A6)gives the multiplication product (A1×A2×A3×A4×A5×A6) of the numbers in the rangeA1:A6, ignoring blanks and even text –– so, for example, ifA1:A6contains { 8, 8, 8, 8, 8, "off" },PRODUCT(A1:A6)is 32768 (8×8×8×8×8). So I guess=IF(AND(COUNT(A1:A6)=6, PRODUCT(A1:A6)>0), …)would work. But chuff’sCOUNTIFanswer is clearly superior. – Scott - Слава Україні Feb 01 '13 at 23:04