I amtrying to use Vlook-up but maybe it is not the right query to use.

I have attached a dummy file to try and explain what I need to do which is:

The Vlook-up looks up [column A from sheet2]   Column B in Sheet1 and returns the detail from column C in Sheet1

However, I need to make it put only the word 'Pending' in Column B on Sheet2 and 'Open' in Column C on this sheet.

So, in this example 'a123456' has two records on Sheet 1, One is Pending one is Open
'x897456' and 'e654125' have no records on Sheet1 therefore they are Blank
The remainder have either 'Pending' or' Open'.

Maybe this is not possible!!!
Who is Participating?
Saqib Husain, SyedConnect With a Mentor EngineerCommented:

Attached herewith modfied sample, see if it helps...
JagwarmanAuthor Commented:
Hi Fayaz, thanks for this, I like it but unfortunately it is not quite what I am looking for.

In the first row where the ref is a123456 I need to put Pending in Cell 'D' and and Open in Cell 'E' as there are two reords in Sheet 1 under that Ref. Also when I copy your formula down in rows 6 and 7 it returns #N/A

FayazConnect With a Mentor Commented:
OK see if this peviot helps, i cant think of a formul to help this out sorry.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.