How to compare a range of data in Excel?

Solved/Closed
shan_asa Posts 7 Registration date Sunday October 29, 2017 Status Member Last seen December 5, 2017 - Updated on Oct 29, 2017 at 10:07 AM
shan_asa Posts 7 Registration date Sunday October 29, 2017 Status Member Last seen December 5, 2017 - Oct 29, 2017 at 02:01 PM
Dear Team,

I want to compare a range of values from columns in row A (A1 to A6) with date input in column C1. If C1 is equal to data in A1 then D1 should reflect B1 and if C1 is equal to A2 then D1 should reflect B2

2 responses

Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Oct 29, 2017 at 10:39 AM
shan_asa, Goodmorning.

Try to do:

D1 --> =IF(A1=$C$1, B1, "")

Copy it down as necessary.

Is this what you want?
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
-1
shan_asa Posts 7 Registration date Sunday October 29, 2017 Status Member Last seen December 5, 2017
Oct 29, 2017 at 10:55 AM
Good Morning Mazzaropi,

In the above formula u gave it is jus comparing A1 and C1. But what I require is the C1 value has to check A1 to A6 and then provide date to column D1. That is if C1 = A1 then D1 should be B1, if C1 = A2 then D1 should be B2 and so on.
Hope you understood what I want.
0
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Oct 29, 2017 at 01:25 PM
shan_asa,
I believe that this time it was possible to correctly understand your doubt.

Try to use:

=INDEX(B1:B6, MATCH(C1,A1:A6,0))

I hope it helps
--
Belo Horizonte, Brasil.
Marcílio Lobão
-1
shan_asa Posts 7 Registration date Sunday October 29, 2017 Status Member Last seen December 5, 2017
Oct 29, 2017 at 02:01 PM
Thank you very much
Dat was awsom
0