[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Job#
[/TD]
[TD]Description
[/TD]
[TD]PO
[/TD]
[TD]Type
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]5400
[/TD]
[TD]311 11st
[/TD]
[TD][/TD]
[TD]job
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]1101
[/TD]
[TD]NC Ward
[/TD]
[TD]350.00
[/TD]
[TD]deck
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]1102
[/TD]
[TD]IL Cotr
[/TD]
[TD][/TD]
[TD]flex
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]1101
[/TD]
[TD]NC Ward
[/TD]
[TD]350.00
[/TD]
[TD]deck
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]5204
[/TD]
[TD]600 Pat Place
[/TD]
[TD][/TD]
[TD]job
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]1102
[/TD]
[TD]IL Cotr
[/TD]
[TD]407.00
[/TD]
[TD]deck
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]1103
[/TD]
[TD]WA Brown
[/TD]
[TD][/TD]
[TD]flex
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I am working on a rather complex timesheet. One total I require is the total PO sum having Type = "deck" with a unique Job#. The job# may be listed more than once, and the PO for that job may be listed more than once - but the difficultly is that the rate for each job should only be added once per job. Also, the function needs to work even if some of the record lines are blank. So, in the example, the correct answer is $757. I am not using VBA. I thank you for your solutions.
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Job#
[/TD]
[TD]Description
[/TD]
[TD]PO
[/TD]
[TD]Type
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]5400
[/TD]
[TD]311 11st
[/TD]
[TD][/TD]
[TD]job
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]1101
[/TD]
[TD]NC Ward
[/TD]
[TD]350.00
[/TD]
[TD]deck
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]1102
[/TD]
[TD]IL Cotr
[/TD]
[TD][/TD]
[TD]flex
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]1101
[/TD]
[TD]NC Ward
[/TD]
[TD]350.00
[/TD]
[TD]deck
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]5204
[/TD]
[TD]600 Pat Place
[/TD]
[TD][/TD]
[TD]job
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]1102
[/TD]
[TD]IL Cotr
[/TD]
[TD]407.00
[/TD]
[TD]deck
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]1103
[/TD]
[TD]WA Brown
[/TD]
[TD][/TD]
[TD]flex
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I am working on a rather complex timesheet. One total I require is the total PO sum having Type = "deck" with a unique Job#. The job# may be listed more than once, and the PO for that job may be listed more than once - but the difficultly is that the rate for each job should only be added once per job. Also, the function needs to work even if some of the record lines are blank. So, in the example, the correct answer is $757. I am not using VBA. I thank you for your solutions.