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: 15
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: 8
  • Example2.JPG
    Example2.JPG
    47.9 KB · Views: 9
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
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,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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