Inexperienced user trying to get a formula to change depending on the day of the week

mattn83

New Member
Joined
Jan 23, 2023
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello!

Like the title states, I am an inexperienced user trying to create a sheet that will calculate bar tips owed to staff. I have managed to piece together something that works, but have one problem I have not been able to find the answer to. I have one cell that I need the formula to change depending on if it's a Friday or Saturday as the hours open are different, and that changes that tipout for that individual. I have tried playing around with IF Weekday functions but can't get it to work, which is probably an error between the chair and the keyboard. I have found a few references to creating a table and pulling from that, but I simply don't really know how to do that. The formula in question is:

=SUM(D2/9)*(B13)*0.2

That is for Friday, if Saturday it needs to be "D2/12", very small change.

I've attached an image showing how I've got it set up. I create a copy for each day, and manually add the date in A2.

Any help would be beyond appreciated!!
 

Attachments

  • Excel1.JPG
    Excel1.JPG
    70.4 KB · Views: 13
Here is the actual workbook. If you click on the 1.14 or 1.13 tab you'll see how it's being calculated. I've been going on in each Friday/Saturday and adjusting the value to either 9 or 12 depending on if it's Friday or Saturday.
In your image B13 is empty, so it would return 0.
When I add the values this is what I get. One shows how I had it before where it returns the $47.60 and the other is where I input your formula and it returns $4.76
 

Attachments

  • Example1.JPG
    Example1.JPG
    39.5 KB · Views: 6
  • Example2.JPG
    Example2.JPG
    47.9 KB · Views: 7
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
There's a typo in my formula as James006 has pointed out it should be
Excel Formula:
=(D2/IF(WEEKDAY(A2)=7,12,9))*B13*0.2
 
Upvote 0
There's a typo in my formula as James006 has pointed out it should be
Excel Formula:
=(D2/IF(WEEKDAY(A2)=7,12,9))*B13*0.2
That seemed to do it. So with the IF function is it basically saying if A2 = 7 (saturday) calculate as 12 and the comma is essentially an ELSE calculate as 9? Trying to learn as I go so I don't have to rely on you all :) thank you very much for the help!
 
Upvote 0
So with the IF function is it basically saying if A2 = 7 (saturday) calculate as 12 and the comma is essentially an ELSE calculate as 9?
That's right. :)

Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,137
Messages
6,123,253
Members
449,093
Latest member
Vincent Khandagale

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