View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.misc
John James
 
Posts: n/a
Default Totals skipping columns


Mike,

Your latest posting sums 3 figures without any conditional testing and
bears no relationship to earlier postings. If you want someone to
comment on this formula then you'll need to explain it more fully.

Let's start again on the previously advised problem.

My understanding of your problem was that in, say, column F you had
1. Column totals in row 17, which I assume had formulae like:
=if(sum(f2:f16)=0,"",sum(f2:f16))
2. Running subtotals adding across the columns in row 18 with this
formula:
=IF(AND(E18,F17),E18+F17,"")
3. You were getting error values in the row 18 formulae (which is
understandable because you were adding numbers and blanks "")
4. You didn't want anything to show in columns which had no amounts to
add, but wanted the totals to carry across to later columns
5. I've had to make assumptions about your worksheet structure which
I'm sure you can adapt. e.g. I assume your first figures are in column
B

The prime source of your confusion, I think, is that blanks "" entered
in cells through your formula are NOT zeros and are NOT the same as
blank cells and CANNOT be added in standard formulae because they will
give errors. So let's dump those blanks "" in your formulae
altogether.

Try this:
1. Select Tools-Options-View and uncheck the box labelled zero values.
This will ensure that zero values aren't visible in your worksheet (I
assume this is what you want)
2. Ensure that your formula in cell B17 evaluates to an amount:
=sum(B2:B16).
Copy this across all relevant columns in row 17.
3. Ensure that your formula in cell B18 adds the relevant figures in
row 17, ignores subtotals in row 18, and evaluates to zero, if the
figure above is 0
= IF(B17=0,0,SUM($B17:B17))
Copy this across all relevant columns in row 18.

If you do this, then you should have nothing shown in the total cells
(rows 17 and 18) in columns which are empty, but have correct totals in
other columns. There should be no need for conditional formatting.

[Note: If you can have a combination of positive and negative values
adding to zero in row 17, making a zero total in a nonj-blank column,
then first get this working and then advise that problem and we'll fix
it.]


--
John James
------------------------------------------------------------------------
John James's Profile: http://www.excelforum.com/member.php...o&userid=32690
View this thread: http://www.excelforum.com/showthread...hreadid=531714