We help IT Professionals succeed at work.
Get Started

Add while deleting rows? Is this possible via VBA Macro

Last Modified: 2016-02-11

I have the attached workbook which in column 'p' has a number. At the end of each number there is a -xx where the xx represents a two digit number. I am only interested in the rows with -11 in however this is where is gets tricky. I would like the amount and hours that appear in column X and Y respectively to be added to the amount and hours for the -11 row; so for example if I had:

Number                  Amount Hours
FR-3418432-11        $10         50
FR-3418432-12        $10         50
FR-3418432-13        $10         50

I would like to delete FR-3418432-12 and FR-3418432-13 but before deleting add the hours and amount for these two rows to FR-3418432-11 so after it would say:

Number                  Amount Hours
FR-3418432-11        $30         150

The attached spreadsheet provides an example with the way in which the data tends to appear. I would be grateful for anyone's input to this as always.


Watch Question
Top Expert 2015
This problem has been solved!
Unlock 3 Answers and 5 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE