if+index+match

kelvin_9

Board Regular
Joined
Mar 6, 2015
Messages
248
hi all, any idea on what's wrong with my formula below, i cant return Khloe Kung result same as others user with same formula.?
what should i amend and fix my issue?

thanks all

 

Some videos you may like

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.

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,342
Change the data in Khloe's cell so it reads 08:00-18:00.
Does this cure the problem?
If so then its because Khloe's cell has two time durations (as does Lodkin's) and Ada's only has one time duration
 

kelvin_9

Board Regular
Joined
Mar 6, 2015
Messages
248
Change the data in Khloe's cell so it reads 08:00-18:00.
Does this cure the problem?
If so then its because Khloe's cell has two time durations (as does Lodkin's) and Ada's only has one time duration
this may not cure?
i have others employee which has 2-3 more duration instead
i dont know where is/are my problem. :confused:

my formula is used to take the first and the last time if more than 2 duration encountered.
for instance, 09:15-11:00, 11:00-15:00, 15:00-18:30, i return 09:15-18:30

ps. khloe is new hire in this week and those formulas working fine before it hired.

thank you
 
Last edited:

kelvin_9

Board Regular
Joined
Mar 6, 2015
Messages
248
Images are of little use in this aspect.
Can you post your formula?
Code:
=IF(INDEX(SCHEDULE!$C:$C,MATCH(RESULT!$A51,SCHEDULE!$A:$A,0))="","",TEXT(MIN(IFERROR(TIMEVALUE(LEFT(INDEX(SCHEDULE!$C:$C,MATCH(RESULT!$A51,SCHEDULE!$A:$A,0)):INDEX(SCHEDULE!$C:$C,MATCH(RESULT!$A52,SCHEDULE!$A:$A,0)-1),5)),1)),"hh:mm")&" - "&TEXT(MAX(IFERROR(TIMEVALUE(MID(INDEX(SCHEDULE!$C:$C,MATCH(RESULT!$A51,SCHEDULE!$A:$A,0)):INDEX(SCHEDULE!$C:$C,MATCH(RESULT!$A52,SCHEDULE!$A:$A,0)-1),7,5)),0)),"hh:mm"))
ps. ctrl+shift+enter

thank you sir
 

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,342
Is it cos of the order of the names?
Your formula refers to the next name down A53 A54 etc

There is no name below Khloe's on the output.

Put the names int he same order.
I suspect Khloe's will correct itself but then Loaklin's will go wrong.
 

kelvin_9

Board Regular
Joined
Mar 6, 2015
Messages
248
Is it cos of the order of the names?
Your formula refers to the next name down A53 A54 etc

There is no name below Khloe's on the output.

Put the names int he same order.
I suspect Khloe's will correct itself but then Loaklin's will go wrong.
wooo~~
any ideas to avoid similar like this but still can return a correct one?
 

Watch MrExcel Video

Forum statistics

Threads
1,099,964
Messages
5,471,739
Members
406,780
Latest member
Todd Gentry

This Week's Hot Topics

Top