Thread: VBA help
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Constance Constance is offline
external usenet poster
 
Posts: 14
Default VBA help

I need some help in creating a procedure that will evaluate whether criteria
is met and if it is met add together the amounts of those rows and then
delete the pre-existing rows. I'll show a small sample of a before and after.

Before picture
Row Criteria Info
Amt
1 53411412312P14 Refund 226786 6527212 12.49
2 53411412312P14 Refund 226786 6561653 1.58
3 95611412312P15 Refund 227766 6505267 27.2
4 95513412312P16 Refund 244221 6292477 20
5 95513412312P16 Refund 244221 6330954 20
6 95513412312P16 Refund 244221 6382828 20
7 51711412312P17 Refund 249575 6391292 17.6
8 51711412312P17 Refund 249575 6556607 16.6
9 53211412312P18 Refund 305592 6428055 477

After
A 53411412312P14 Refund 226786 6527212 14.07
B 95611412312P15 Refund 227766 6505267 27.2
C 95513412312P16 Refund 244221 6292477 60
D 51711412312P17 Refund 249575 6391292 34.2
E 53211412312P18 Refund 305592 6428055 477

Actually, my criteria column is a formula that concatenates 3 other columns
together and basically what I want is to find the Refunds where those three
items are the same and adds those row amounts together then deletes the rows
containing the previous amounts. Rows 1 & 2 in the Before were replaced with
Row A in after, rows 4,5 & 6 were replaced with C and rows 7 & 8 were
replaced with D.
Hope that is clear enough to receive help. I really appreciate your time!
Thank you.
Constance