=INDEX(Table1[Source]:Table1[Source],MATCH(1,($A6=Table1[ID]:Table1[ID])*($B$3=Table1[StartDate]:Table1[StartDate]),0))
Is it possible to get results as true or false from the above formula![]()
=INDEX(Table1[Source]:Table1[Source],MATCH(1,($A6=Table1[ID]:Table1[ID])*($B$3=Table1[StartDate]:Table1[StartDate]),0))
Is it possible to get results as true or false from the above formula![]()
In what sense? What would you want to see returned from the formula to trigger a TRUE response? If it's the word "banana", try this:
=INDEX(Table1[Source]:Table1[Source],MATCH(1,($A6=Table1[ID]:Table1[ID])*($B$3=Table1[StartDate]:Table1[StartDate]),0))="Banana"
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
Since your formula is contained in an INDEX() your formula is returning a value.
To determine if the result is TRUE or FALSE you need to define what value it should be for TRUE (at least).
Over to you...
Regards
Special-K
Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.
Like if a match is found, then true, otherwise false? If so, wrap your formula in a IF: =IF(iserror(your formula),"false","true")
Click the * to say thanks.
I tried...
=IF(AND($A21=Table1[ID]:Table1[ID],$B$15=Table1[StartDate]:Table1[StartDate]),"True","False")
but I get "False" for all
I just want to check cells A21=Table1[ID] and B15=Table1[StartDate]
I think that you want to check if these two are match: =IF(AND(VLOOKUP($A21,Table1[ID]:Table1[ID],1,0),VLOOKUP($B$15,Table1[StartDate]:Table1[StartDate],1,0)),"True","False")
You are right PaulM
I am getting #REF error from the following formula :
=IF(AND(VLOOKUP(Calendar!$A21,Table1[ID]:Table1[ID],14,0),VLOOKUP(Calendar!$B$15,Table1[StartDate]:Table1[StartDate],8,0)),"tr","fa")
A #REF error on a VLOOKUP suggests you are trying to retrieve a column that's beyond the range that is being looked up, e.g.
VLOOKUP(A1,B1:C100,3,0)
returns #REF because the range B1:C100 is only 2 columns wide yet column 3 is trying to be returned.
Check your table ranges, make sure there are 14 and 8 columns to retrieve from the tables respectively.
Hmmmm...
I extended the range from first to last and made sure columns are 14 and 8 to retrive
I get #N/A for this formula
=IF(AND(VLOOKUP(Calendar!$A21,Table1[Ref]:Table1[Email],14,0),VLOOKUP(Calendar!$B$15,Table1[Ref]:Table1[Email],8,0)),"tr","fa")
I tried only one column ...then I get #VALUE error
=IF(AND(VLOOKUP(Calendar!$A21,Table1[ID]:Table1[ID],1,0),VLOOKUP(Calendar!$B$15,Table1[StartDate]:Table1[StartDate],1,0)),"tr","fa")
There's no error trapping in your AND(), the implication is both VLOOKUPs will work which makes the "false" redundant. It will never appear, what will appear is an error on one or more of the VLOOKUPs or the value "true".
#N/A means the value cant be found
#VALUE can mean the lookup exceeds 255 chars
or Full path to the lookup workbook is not supplied
Can you post the data for a thorough check?
Last edited by Special-K; 01-17-2019 at 12:18 PM.
I broke up the formula
=IF(VLOOKUP(A6,Table1[ID],1,0),"A","B") returns #VALUE! error
=VLOOKUP(A6,Table1[ID],1,0) returns value from cell A6
so definately something to do with IF formula![]()
Last edited by mikehk; 01-17-2019 at 12:29 PM.
I tried ....
=IF(VLOOKUP(A6,Table1[ID],1,0)=FALSE,"a","b") returns b
=IF(VLOOKUP(A6,Table1[ID],1,0)=TRUE,"a","b") returns b
it doesn't
Looks like you're only interested in the values being present, not actually what the values are.
Can't you just do a
=IF(AND(NOT(ISNA(VLOOKUP(Calendar!$A21,Table1[Ref]:Table1[Email],14,0))),NOT(ISNA(VLOOKUP(Calendar!$B$15,Table1[Ref]:Table1[Email],8,0)))),TRUE,FALSE)
Thanks a lot but sorry this formula returns FALSE for everything.
That's true I am only interested in values being present and not actually what they are,
all I need is if cell A21 and B15 match, return true or yes or "abc" and if they are not return
false or no...or "xyz" !![]()
Attach the workbook, please.
Workbook attached is a good idea.
In the meantime, drawing from the formula from Post#1, tryFormula:
Please Login or Register to view this content.
A B C D E F G H 1 Source ID StartDate EndDate 173 1/21/2019 TRUE 2 Bob 110 1/19/2019 1/22/2019 170 1/26/2019 FALSE 3 John 194 1/24/2019 1/29/2019 159 1/26/2019 FALSE 4 Mike 159 1/18/2019 1/23/2019 106 1/23/2019 TRUE 5 Jacob 173 1/21/2019 1/26/2019 6 Kelly 170 1/22/2019 1/26/2019 7 Martha 159 1/21/2019 1/26/2019 8 Joe 106 1/23/2019 1/28/2019 9 Rachel 135 1/19/2019 1/24/2019 10 Liz 154 1/18/2019 1/22/2019 11
Dave
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks