Complete my formula...if function with multiple criteria (or alternative ideas)

colinheslop1984

Board Regular
Joined
Oct 14, 2016
Messages
129
Office Version
  1. 2016
Please can someone correct my formula, I feel like I am so close but struggling to get it right.

Below is as far as I have got but I just cant find the right expressions for it to work correctly. I have attached a picture of the document I am working with for your reference.

=IF(E8="",IF($C8<$C$2,$B8*$C$1,SUM($C$1-$F8)*$B8),(E8-F8)*B8)

I want to calculate YTD contracted hours with the following considerations

if start date is < c2 then multiply contracted hours by c1
if start date if > c2 then multiply contracted hours by value of c1-e8
if employment end date is inputted I want the calculation to stop beyond the date or week number inputted in either d8 or e8 respectively, e8 is preffered
If no employment end date is inputted, the calculation should continue to run

Thanks
 

Attachments

  • rota.jpg
    rota.jpg
    76.7 KB · Views: 6

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi, we are pleased to help you, but please, put your data example, using XL2BB.
Note: If would necessary, pay attention to this post XL2BB 2 Square

In some cases, users are disabled for install an add-in. If this condition is applicable, share your file with Dropbox, Drive, etc.

Also, you can copy and paste your data, formatting until if look like your Workbook.
 
Upvote 0
=IF($E9="",SUM(IF($C9<$C$2,$B9*$C$1,($C$1-$F9)*$B9)),SUM(IF($C9<$C$2,$E9*$B9,($E9-$F9)*$B9)))

I figured it out, solution above if anyone wanted to see it
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

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