View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Macro to insert rows in Excel

I would suggest you leave your database alone and use another method on
another sheet to get the sums
something like:
=sumproduct((sheet2!a2:a2000=12345)*sheet2!b2:b200 0)

--
Don Guillett
SalesAid Software

"kden" wrote in message
...
Column A is account numbers, with each row an individual transaction. So,
there may be thousands of transactions for a single account number. The

macro
would search the numbers (in column A) and when there's a "new number"
(essentially, new transactions for a different account number), I'd like

for
the macro to insert 2-3 rows at the end of each account so that I can sum

the
debits/credits for the account.

"gocush" wrote:

Can you tell us what you mean by a "New number"

"kden" wrote:

I'm trying to create a macro which will search the data (text and/or

number)
in column A. When it finds a new number, I would like to insert 2-3

rows at
the end of the previous number, then continue through the entire

worksheet
doing the same thing.