formula code help

vbidiot

New Member
Joined
Jan 29, 2006
Messages
28
Hey All,

I'm looking to write a code for the below spreadsheet. I need for the sum of RG, SL, PL hours to equal the WD hours for each individual. For example, if Janey Doooe has 32 RG hours, 4 SL hours, 4 PL hours then the WD hours need to equal 40 hours. Also, if the person does not have any RG hours, SL hours, or PL hours then HW and WD hours need to be deleted. I've wrestled with this many different ways but can't quite come out with a simple code for it. Here's a bit of sample from the spreadsheet.

NAME WC PUNIT PRATE
Doooe, Janey HW 1.00 -$7.60
Doooe, Janey RG 32.00 11.83
Doooe, Janey SL 4.00 11.83
Doooe, Janey PL 4.00 11.83
Doooe, Janey WD 0.00 $2.87
Dossss, Jake HW 1.00 -$10.78
Dossss, Jake RG 40.00 $12.56
Dossss, Jake WD 0.00 $2.87

Thanks!!!!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
"at each change in name" factor

Is it possible to use "at each change in name" to help with the coding?

Ex. At each change in name, total RG, SL, PL hours and then enter toal amount in WD hours field.

EX. at each change in name, if name does not have RG, SL, or PL hours then delete HW, WD hours.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,538
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top