Date to determine if cell to be filled or not

Tarma

New Member
Joined
Jan 4, 2018
Messages
2
Hallo all,

I'm working on a sheet for overtime and need the Weekdays to populate under the 1.5 hours column and the Sundays and public holidays to populate in the 2 hours column.

Date inserted, I used a simple IF statement to test =IF(B5="Sunday",G5=F5,"")
B5 - where date is inserted
G5 - where data and formula is inserted
F5 - the value I want returned (hours worked)

I set up another sheet with public holidays and all the days of the year and tried a VLOOKUP, but the return I need is in the hours worked and not the date range table.

I also tried the highlighting public holidays and Sundays but that works well with the set up of a calendar.

Please help me, my light bulb is broken...:(
 

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.
This very confusing.

1) This

=IF(B5="Sunday",G5=F5,"")

will return TRUE FALSE or blank.

2) "B5 - where date is inserted"
B5 will NEVER = Sunday since "Sunday" is not a date. It's a day of the week.

You probably need IF(WEEKDAY(B5)=1...)

3) "G5 - where data and formula is inserted"
Cells can contain data OR formulas. Not both.

Based on all this you'd be better of pasting a small image of the file.
 
Upvote 0
I deleted the G5=F5 part and just inserted F5, and I see what the issue is. B5 has a formula that produces the work Sunday so the formula doe snot recognize it unless I type the work Sunday. But I need the formula, so I'm back to the drawing board.

Can you provide an alternative formula to use?

I can't select a picture, I have broken the sheet down hopefully it helps:
B - Day of the week (converted from column C)
C - date worked
D - time in
E - time out
F - total hours worked (time out minus time in)
G - 1.5 hours
H - 2 hours
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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