Multiple IF ISNUMBER SEARCH for multiple criteria and each column

kenrin8885

New Member
Joined
Jan 25, 2018
Messages
1
Hi, this is my first post here.
I have a sheet to calculate the working time.

The thing I want is that if Mr A is present in J9 & X9="Whole day" then his total working time is 7:00 and the result will be in V9.
On the 23rd if Y9="Morning" then his working time in V9 will be 10:30 and the same for other days.
If Mr B is in the same cell as Mr A then the calculation is the same as Mr A.
I've written a formula but the result was not correct.
<bdo dir="ltr">=if(or(and(ISNUMBER(SEARCH("Whole Day",X$9:AA$9)),ISNUMBER(SEARCH("Mr. A",$J$9)))),$AK$7,"0:00:00")

And if I have many employees and many working days then the formula will be very long. Is there a way I can optimize it?
Sorry for bad English.
Here is a picture of my sheet.
https://s18.postimg.org/yr53rpn15/attachment.png



</bdo>
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

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