IFAND function not working

Tristram_ZX81

New Member
Joined
Jun 22, 2021
Messages
45
Office Version
  1. 365
Platform
  1. Windows
Hello. I'm trying to get excel in Office 365 to count a freelancer rate depending on who it is and what time they started. So in the example below, you'd want it to say 100 if Matt started at 19:00, but 80 if he started at 10:00. However as it stands it always counts the lower, pre 15:00 figure for everyone. Any ideas?

=IF(AND(A613="Matt",E613>"14:59"),100,
IF(AND(A613="Matt",E613<"14:59"),80,
IF(AND(A613="Alex",E613>"14:59"),120,
IF(AND(A613="Alex",E613<"14:59"),100,
IF(AND(A613="Harry",E613>"14:59"),200,
IF(AND(A613="Harry",E613<"14:59"),150,
))))))
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
"14:59" is text, not a time. Use TIME(15,0,0) instead. I'd suggest putting it in a cell or defined name so you don't have to keep typing it, or use LET in your formula.
 
Upvote 0
Also, instead of continually repeating the time, perhaps a structure like this could be used?

Excel Formula:
=INDEX(IF(E613>=TIME(15,0,0),{100,120,200},{80,100,150}),MATCH(A613,{"Matt","Alex","Harry"},0))
 
Upvote 0

Forum statistics

Threads
1,215,159
Messages
6,123,348
Members
449,097
Latest member
thnirmitha

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