We help IT Professionals succeed at work.

# Compare 1 Column to another, if equal value then return a value in another field.

on
Looking for the function to compare the value in the column on sheet  T1 column A to Sheet Parameter, col B,

If the value in colb = T1!A then return the value in Column E of a -1.

Have loop thru to determine which Parameters are OptLimit in the Parameter sheet.

I am rusty in Excel functions.

What is the proper syntax - I thought Vlookup would do it, need help.

Karen
complete-list.xlsx
Comment
Watch Question

## View Solution Only

Commented:
Here you go.
=VLOOKUP(A2,TWD_ParamOriginal!B2:D7074,3,FALSE)
BI ANALYST

Commented:
ok is that update the value in the Parameter!E2-E.................?

k

Commented:
Hmm...many have misunderstood you explanation.

To lookup the Parameter value from TWD_Para... on sheet T1, use this one instead.

=VLOOKUP(B2,'T1'!\$A\$2:\$B\$1346,2,FALSE)

Commented:
Here's the sample with the Vlookup on both sheets.

complete-list-1-.xlsx
BI ANALYST

Commented:
thanks for the assist, however, I need the -1 value to appear in the Parameter sheet Column E not the other way around.

Sheet T1 Column B should = -1 already.

I want to update TWD_ParamOriginal sheet Col E only when the TWD_ParamOriginal.Parameter ID = T1.Parameter ID
BI ANALYST

Commented:
to Clarify

I want to lookup the value from T1.A.1 and find its counter part in TWD_ParamOriginal!\$B and if true place an -1 in TWD_ParamOriginal!\$E.
Commented:
You use (in TWD_ParamOriginal.E1)

=IF(ISNA(VLOOKUP(B2,'T1'!\$A\$2:\$A\$1346,1,0)),"",-1)

=-1+ISNA(VLOOKUP(B2,'T1'!\$A\$2:\$A\$1346,1,0))

complete-list.xlsx

Commented:
Actually make it You use (in TWD_ParamOriginal.E2)

I wish there was Edit function :)
Retired IT Professional

Commented:
Remove duplicate values in sheet T1
Reduce the records to few (say 10) to get the solution then expand your data.
Give an example of the output manually for few records.
BI ANALYST

Commented:
thanks to all for your assistances