Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Conditionally ignoring certain cells in columnar calculations
It's probably easier if I ask this using an example, so please reference this
sample: A B 1 0.3 0.2 2 0.4 0.3 3 0.5 0.4 4 # N/A N/A 0.5 I use a Bloomberg add-in to automatically load data into Excel. If for some reason this data is not available, the add-in will return a value such as the one seen in cell A4. What I'm trying to do is sum these numbers and calculate the percentage change from the sum of column B to the sum of column A. However, calculating the percentage change in three quarters' worth of data over four is useless, so I'm trying to find a way (SUMIF?) to exclude cell B4 from the sum calculation of column B if the adjacent cell (A4) is blank or contains an error code like the one shown above. Is this possible? Thanks so much for the help! |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Conditionally ignoring certain cells in columnar calculations
It's not pretty, but this should get you the sum of column B that you want:
=SUMPRODUCT(--NOT(ISERROR(A1:A4)),--NOT(ISBLANK(A1:A4)),B1:B4) HTH, Elkar "Damien" wrote: It's probably easier if I ask this using an example, so please reference this sample: A B 1 0.3 0.2 2 0.4 0.3 3 0.5 0.4 4 # N/A N/A 0.5 I use a Bloomberg add-in to automatically load data into Excel. If for some reason this data is not available, the add-in will return a value such as the one seen in cell A4. What I'm trying to do is sum these numbers and calculate the percentage change from the sum of column B to the sum of column A. However, calculating the percentage change in three quarters' worth of data over four is useless, so I'm trying to find a way (SUMIF?) to exclude cell B4 from the sum calculation of column B if the adjacent cell (A4) is blank or contains an error code like the one shown above. Is this possible? Thanks so much for the help! |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Conditionally ignoring certain cells in columnar calculations
That did it. Thanks for the help!
"Elkar" wrote: It's not pretty, but this should get you the sum of column B that you want: =SUMPRODUCT(--NOT(ISERROR(A1:A4)),--NOT(ISBLANK(A1:A4)),B1:B4) HTH, Elkar "Damien" wrote: It's probably easier if I ask this using an example, so please reference this sample: A B 1 0.3 0.2 2 0.4 0.3 3 0.5 0.4 4 # N/A N/A 0.5 I use a Bloomberg add-in to automatically load data into Excel. If for some reason this data is not available, the add-in will return a value such as the one seen in cell A4. What I'm trying to do is sum these numbers and calculate the percentage change from the sum of column B to the sum of column A. However, calculating the percentage change in three quarters' worth of data over four is useless, so I'm trying to find a way (SUMIF?) to exclude cell B4 from the sum calculation of column B if the adjacent cell (A4) is blank or contains an error code like the one shown above. Is this possible? Thanks so much for the help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditionally formatting other cells? | Excel Worksheet Functions | |||
Ignoring highlighted cells | Excel Worksheet Functions | |||
Calculations on Only Unhidden Data Cells | Excel Discussion (Misc queries) | |||
blank cells in calculations | Excel Worksheet Functions | |||
How do I do count calculations ignoring duplicate values | Excel Discussion (Misc queries) |