Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
testing cells in a row
I am trying to check whether there are any values in, for example row 10
cells A-M and IF there are any values in ANY of those cells then I will total A10:M10 in cell N10. I am having trouble with the IF code for cell N10 to check the other cells for values |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
testing cells in a row
If Application.Sum(Range("A10:M10")) "" Then
N10 = Application.Sum(Range("A10:M10")) End If "thomas donino" wrote in message ... I am trying to check whether there are any values in, for example row 10 cells A-M and IF there are any values in ANY of those cells then I will total A10:M10 in cell N10. I am having trouble with the IF code for cell N10 to check the other cells for values |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
testing cells in a row
That is for VB I assume, can I put a formula in cell N10 that works the same
way? "JLGWhiz" wrote: If Application.Sum(Range("A10:M10")) "" Then N10 = Application.Sum(Range("A10:M10")) End If "thomas donino" wrote in message ... I am trying to check whether there are any values in, for example row 10 cells A-M and IF there are any values in ANY of those cells then I will total A10:M10 in cell N10. I am having trouble with the IF code for cell N10 to check the other cells for values |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
testing cells in a row
see if this does what you want. Place in N10
=IF(SUM(A10:M10),SUM(A10:M10),0) -- jb "thomas donino" wrote: That is for VB I assume, can I put a formula in cell N10 that works the same way? "JLGWhiz" wrote: If Application.Sum(Range("A10:M10")) "" Then N10 = Application.Sum(Range("A10:M10")) End If "thomas donino" wrote in message ... I am trying to check whether there are any values in, for example row 10 cells A-M and IF there are any values in ANY of those cells then I will total A10:M10 in cell N10. I am having trouble with the IF code for cell N10 to check the other cells for values |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
testing cells in a row
That is for VB I assume..
Hi. This is in excel.programming. :) As a worksheet formula, perhaps: =IF(COUNT(A10:M10)0,SUM(A10:M10),#N/A) (#N/A to your choice of course) = = = = = = = HTH :) Dana DeLouis thomas donino wrote: That is for VB I assume, can I put a formula in cell N10 that works the same way? "JLGWhiz" wrote: If Application.Sum(Range("A10:M10")) "" Then N10 = Application.Sum(Range("A10:M10")) End If "thomas donino" wrote in message ... I am trying to check whether there are any values in, for example row 10 cells A-M and IF there are any values in ANY of those cells then I will total A10:M10 in cell N10. I am having trouble with the IF code for cell N10 to check the other cells for values |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
testing cells in a row
i was going to throw one out there too, but i can't really see the logic here.
if there are no numbers, you're not going to have a sum anyway. so, = sum(a10:m10) will = 0 if here is only text or zeroes, and a value if a number is contained in the range. or, am i missing something? -- Gary Keramidas Excel 2003 "Dana DeLouis" wrote in message ... That is for VB I assume.. Hi. This is in excel.programming. :) As a worksheet formula, perhaps: =IF(COUNT(A10:M10)0,SUM(A10:M10),#N/A) (#N/A to your choice of course) = = = = = = = HTH :) Dana DeLouis thomas donino wrote: That is for VB I assume, can I put a formula in cell N10 that works the same way? "JLGWhiz" wrote: If Application.Sum(Range("A10:M10")) "" Then N10 = Application.Sum(Range("A10:M10")) End If "thomas donino" wrote in message ... I am trying to check whether there are any values in, for example row 10 cells A-M and IF there are any values in ANY of those cells then I will total A10:M10 in cell N10. I am having trouble with the IF code for cell N10 to check the other cells for values |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
testing cells in a row
= sum(a10:m10) will = 0 if here is only text or zeroes,
Hi. The sum could be zero from, say, only two values of +5, and -5. The op will have to decide want he wants to do. :) Dana DeLouis Gary Keramidas wrote: i was going to throw one out there too, but i can't really see the logic here. if there are no numbers, you're not going to have a sum anyway. so, = sum(a10:m10) will = 0 if here is only text or zeroes, and a value if a number is contained in the range. or, am i missing something? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
testing cells in a row
Thanks to all respondents, I am using
=IF(SUM(A10:M10) < 0,SUM(A10:M10),0) and its working just fine "Dana DeLouis" wrote: = sum(a10:m10) will = 0 if here is only text or zeroes, Hi. The sum could be zero from, say, only two values of +5, and -5. The op will have to decide want he wants to do. :) Dana DeLouis Gary Keramidas wrote: i was going to throw one out there too, but i can't really see the logic here. if there are no numbers, you're not going to have a sum anyway. so, = sum(a10:m10) will = 0 if here is only text or zeroes, and a value if a number is contained in the range. or, am i missing something? |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
testing cells in a row
How would i test to see if EVERY cell in that range was blank?
"Dana DeLouis" wrote: = sum(a10:m10) will = 0 if here is only text or zeroes, Hi. The sum could be zero from, say, only two values of +5, and -5. The op will have to decide want he wants to do. :) Dana DeLouis Gary Keramidas wrote: i was going to throw one out there too, but i can't really see the logic here. if there are no numbers, you're not going to have a sum anyway. so, = sum(a10:m10) will = 0 if here is only text or zeroes, and a value if a number is contained in the range. or, am i missing something? |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
testing cells in a row
try this
=IF(COUNTBLANK(A10:M10)=13,"all blank","not all blank") -- Gary Keramidas Excel 2003 "thomas donino" wrote in message ... How would i test to see if EVERY cell in that range was blank? "Dana DeLouis" wrote: = sum(a10:m10) will = 0 if here is only text or zeroes, Hi. The sum could be zero from, say, only two values of +5, and -5. The op will have to decide want he wants to do. :) Dana DeLouis Gary Keramidas wrote: i was going to throw one out there too, but i can't really see the logic here. if there are no numbers, you're not going to have a sum anyway. so, = sum(a10:m10) will = 0 if here is only text or zeroes, and a value if a number is contained in the range. or, am i missing something? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Testing Cells | New Users to Excel | |||
TESTING A RANGE OF CELLS | Excel Worksheet Functions | |||
Testing Values of Cells | Excel Programming | |||
Testing for contiguous cells | Excel Programming | |||
testing for non-empty cells | Excel Programming |