Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sumif Macro
I process a lot of jnls that are uploaded into our system from Excel. As such
to make sure they balance I put 2 Sumif formulas at the bottom of the column, both should agree to each other. I am sick of having to write these each time and so I want to automate it. The situations is this. The top of the range is row 2 but the bottom varies with the number of transactions. The formula will be at the bottom of the column to be added and the reference column is 2 columns to the left. A typical set of formulas would look like this. In Cell H791 - =sumif($F$2:$F$789,40,$H$2:$H$789) In Cell H792 - =sumif($F$2:$F$789,50,$H$2:$H$789) Occasionally the 40 or 50 will be something different but I can amend that once the formula is written. How can I write a macro to duplicate this so that the top cell is in Row 2 and the bottom cell is 2 cells above where the active cell is and where the formulas are to be? Thanks in advance. Rick |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro with sumif | Excel Discussion (Misc queries) | |||
macro with sumif | Excel Worksheet Functions | |||
macro for sumif formula | Excel Programming | |||
How do I sum across rows in a macro? SumIf? | Excel Programming | |||
sumif formula in a macro | Excel Programming |