Need Help with Formula / Skipping Lines

hscott82

New Member
Joined
Oct 30, 2019
Messages
33
Hello, I am trying to create a sheet in Excel to pull Hours from another sheet to upload into a system as a CSV file. I need a formula for hours that would pull in the Reg Hours and then say if the Overtime cell has a value then it will make a second line for that same employee and pull in those hours. Then it would go to the next employee. Note NOT every employee has Overtime so we will not always need a second line for each employee.

This is an example of the simple CSV file we will upload (there are other columns) These will pull from another Excel Sheet in the same workbook.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Employee ID[/TD]
[TD]Code[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]123456[/TD]
[TD]REG1[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]123456[/TD]
[TD]OT1[/TD]
[TD]4.5[/TD]
[/TR]
[TR]
[TD]223344[/TD]
[TD]REG1[/TD]
[TD]38[/TD]
[/TR]
[TR]
[TD]556622[/TD]
[TD]REG1[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]556622[/TD]
[TD]OT1[/TD]
[TD]6.3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
1563.jpg

This 1st picture is the1st sheet (Time) where we input the manual timesheets for each employee from left to right.
54898.jpg

This 2nd picture is up close of the far-right summary of the data of the manual timesheets, this is the data I need pulled to the next sheet below. This will be summarized into a CSV file to be uploaded. The problem is the lines for REG1 and OT1, how to pull over REG1 and then IF there is OT1 then there is another line for the same employee. Not all will have OT1.
9848.jpg

This 3rd picture is the 2nd sheet for the import. This is where I need to pull over the data from the above (REG1 and OT1).
 
Upvote 0

Forum statistics

Threads
1,224,876
Messages
6,181,519
Members
453,050
Latest member
Obil

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