Avatar of gisvpn
gisvpn
Flag for United States of America asked on

Add while deleting rows? Is this possible via VBA Macro

Hello,

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.

Regards,

GISVPN
Example-WS--3.xlsx
Microsoft ExcelMicrosoft OfficeVBA

Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon
Saurabh Singh Teotia

Quick question will be the one which has -11 entry will always be the first before rest or it can be later as well??

What i mean -12 and -13 and then -11 or it will be always -11 ,-12 and -13??

Saurabh...
ASKER CERTIFIED SOLUTION
Saurabh Singh Teotia

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Subodh Tiwari (Neeraj)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Rob Henson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Martin Liss

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Your help has saved me hundreds of hours of internet surfing.
fblack61