Share via

Aligning columns with IF Function

Anonymous
2022-08-09T09:54:29+00:00

Hi All, I'm struggling with this issue.

Essentially, I have two groups, 1 and 2, which have correlating scores. I need to match the score columns from the two groups (so the score for A in Group 1 (Cell B2) is next to the score for A in Group 2 (Cell F8).

I've narrowed it down to an IF function spread over a range of cells as you can see in the image, but I get a spill over of every false value. I just want one cell where the correct value is, as shown in the bottom table.

I would appreciate all help, thank you!

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2022-08-09T11:24:27+00:00

If you want the XLOOKUP formula to return blanks instead of zeros:

=XLOOKUP(A2,$E$2:$E$12,$F$2:$F$12,"")

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2022-08-09T10:13:42+00:00

Hi Jack

Try this formula in cell C2 and copy it down

=IFERROR(VLOOKUP(A2,$E$1:$F$12,2,0),"")

If Group 1 is not found in Group 2 table will show "blank"

I hope this helps you

Regards

Jeovany

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2022-08-09T10:02:39+00:00

In C2:

=XLOOKUP(A2,$E$2:$E$12,$F$2:$F$12,0)

Fill down to C12

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-08-09T11:06:07+00:00

    Jeovany, this is amazing, thank you so much - No 0's too, that's a nice touch!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-08-09T11:05:30+00:00

    In C2:

    =XLOOKUP(A2,$E$2:$E$12,$F$2:$F$12,0)

    Fill down to C12

    Thank you Hans, this worked like a treat!

    Was this answer helpful?

    0 comments No comments