Trying to use IF formula

Copper Contributor
Hi Guys!

I need to calculate total hours worked on a Saturday. Let me explain:
In column F I have total hours worked for the day & in column B I have my calendar days (e.g. Monday, Sunday ....). Now in column G i need a formal (i assume it would be an IF) that will give me the total hours worked (the data in column F) if data in column B = Saturday.

I hope someone can help me! Thank you!
2 Replies

@Mellan3
Hello! I am not sure why you would need the formula for that in Column G. If you can share your sample data, I can help better. However, I created this dummy data not sure if that's how yours look like and if so, the formula you need is the SUMIF formula. Please find the attached excel and let me know if it is what you like; I made the SUMIF formula dynamic so that if you need the sum of hours for any other day, select the data under the drop-down in cell G2.

 

If column B contains Monday etc. as text, you can use a SUMIF formula:

 

=SUMIF(B2:B100, "Saturday", F2:F100)

 

Adjust the ranges if needed.

If column B contains date values formatted as dddd to display the day of the week, you'll need a different formula, for example

 

=SUMPRODUCT(--(WEEKDAY(B2:B100)=1),F2:F100)