Share via

Excel SUMIF / IF FUNCTION return text

Anonymous
2017-06-29T19:48:52+00:00

trying to have the text value of a cell returned when a condition is met.

i.e. - if cell A1 is equal to a value in a range (a6:a20) return the value of a cell in a range (b6:b20) but the values in B are text

Microsoft 365 and Office | Excel | For home | MacOS

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
2017-06-29T21:15:32+00:00

=VLOOKUP(A1,A6:B20,2,FALSE)

This formula will return #N/A if there is no match. You can suppress this error value using IFERROR:

=IFERROR(VLOOKUP(A1,A6:B20,2,FALSE),"")

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-07-03T13:37:04+00:00

    Thank you Hans - with that I was able to get what I wanted to do to work!

    much appreciated

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-07-01T08:01:08+00:00

    Hi Askew1,

    Have you tried Han's suggestion?

    Regards,

    Tisky

    Was this answer helpful?

    0 comments No comments