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!!!!
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

vbidiot

New Member
Joined
Jan 29, 2006
Messages
28
"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.
 

Watch MrExcel Video

Forum statistics

Threads
1,114,673
Messages
5,549,351
Members
410,910
Latest member
DessertDiva
Top