LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 334
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro with sumif orquidea Excel Discussion (Misc queries) 4 December 7th 07 02:15 AM
macro with sumif orquidea Excel Worksheet Functions 1 December 5th 07 08:02 PM
macro for sumif formula supamari0 Excel Programming 1 July 3rd 06 09:46 PM
How do I sum across rows in a macro? SumIf? future Excel Programming 8 February 5th 04 11:56 PM
sumif formula in a macro paul[_13_] Excel Programming 0 January 23rd 04 03:51 PM


All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"