Conditional List

  • Thread starter Thread starter Debbiejj
  • Start date Start date
D

Debbiejj

I need help writing a formula that will list the values of B3:B53 for which
A3:A53 is equal to a specifiic value.
A3:A53 are set up with dropdown menus to select from a list of values (in
this case locations) and I need to have a cell which lists the values in B
for each item in the list.
Is there a way to do this without creating a mile long if statement?
 
This is easily accomplished by creating a simple 2 column datalist in an
out-of-the-way location, with the locations in the first column and the
pertinent values in the next column.

Say you enter the locations in Y1 to Y25,
And the accompanying data in Z1 to Z25.

Then try something like this in B3:

=Vlookup(A3,Y$1:Z$25,2,0)

And copy down as needed.

If you're annoyed by the #N/A errors when Column A may be empty, you can try
this formula:

=If(ISNA(Match(A3,Y$1:Y$25,0)),"",Vlookup(A3,Y$1:Z$25,2,0))
 
Thank you very much. This will do it.

RAGdyer said:
This is easily accomplished by creating a simple 2 column datalist in an
out-of-the-way location, with the locations in the first column and the
pertinent values in the next column.

Say you enter the locations in Y1 to Y25,
And the accompanying data in Z1 to Z25.

Then try something like this in B3:

=Vlookup(A3,Y$1:Z$25,2,0)

And copy down as needed.

If you're annoyed by the #N/A errors when Column A may be empty, you can try
this formula:

=If(ISNA(Match(A3,Y$1:Y$25,0)),"",Vlookup(A3,Y$1:Z$25,2,0))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top