Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default search or vlookup help

I'm trying to get excel lookup a value and than search for that value
in a column and then return the value two columns to the right. I know
this sound like vlookup but I want excel to continue looking after it
finds the first instance of my lookup value because there maybe 3 or 4
instance of my lookup value that have different values two columns to
the right. How can I do this and what function should I use if possible.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default search or vlookup help

But as I understand it vlookup will only return the first instance of a
lookup value.
For example If I do a vlookup in column A for the word DOG and return
the value 3 columns to the right and DOG is in Colum A in rows 3,5, and
7 and in column C row 3 is the word RED, and column C row 5 is the word
WHITE and column C row 7 is the word BLUE. The way vlookup works it
will only return the word RED, I want it to return RED, WHITE and BLUE.

Is this not correct?








Don Guillett wrote:
you can do this with vlookup by expanding your range and just using the
column desired
OR
you can use match to find the row and put that in an index formula
or
use offset

--
Don Guillett
SalesAid Software

"Little Penny" wrote in message
oups.com...
I'm trying to get excel lookup a value and than search for that value
in a column and then return the value two columns to the right. I know
this sound like vlookup but I want excel to continue looking after it
finds the first instance of my lookup value because there maybe 3 or 4
instance of my lookup value that have different values two columns to
the right. How can I do this and what function should I use if possible.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default search or vlookup help

=INDEX(C1:C100,MAX(IF(A1:A100="Bob",ROW(A1:A100))) )

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Little Penny" wrote in message
ups.com...
But as I understand it vlookup will only return the first instance of a
lookup value.
For example If I do a vlookup in column A for the word DOG and return
the value 3 columns to the right and DOG is in Colum A in rows 3,5, and
7 and in column C row 3 is the word RED, and column C row 5 is the word
WHITE and column C row 7 is the word BLUE. The way vlookup works it
will only return the word RED, I want it to return RED, WHITE and BLUE.

Is this not correct?








Don Guillett wrote:
you can do this with vlookup by expanding your range and just using the
column desired
OR
you can use match to find the row and put that in an index formula
or
use offset

--
Don Guillett
SalesAid Software

"Little Penny" wrote in message
oups.com...
I'm trying to get excel lookup a value and than search for that value
in a column and then return the value two columns to the right. I know
this sound like vlookup but I want excel to continue looking after it
finds the first instance of my lookup value because there maybe 3 or 4
instance of my lookup value that have different values two columns to
the right. How can I do this and what function should I use if

possible.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default search or vlookup help


A B C

1 CAT CAT GREEN
2 CAT CAT YELLOW
3 DOG CAT RED
4 CAT CAT ORANGE
5 DOG CAT WHITE
6 CAT CAT BLACK
7 DOG CAT BLUE

Thanks Bop for you rely. I modified your formula for the above example

=INDEX(C1:C100,MAX(IF(A1:A100="DOG",ROW(A1:A100))) )

I only get "BLUE" not "RED WHITE AND BLUE". I also made sure to use
Ctrl-Shift-Enter. How do I combine these value in to one cells or over
serveral cell.















Bob Phillips wrote:
=INDEX(C1:C100,MAX(IF(A1:A100="Bob",ROW(A1:A100))) )

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Little Penny" wrote in message
ups.com...
But as I understand it vlookup will only return the first instance of a
lookup value.
For example If I do a vlookup in column A for the word DOG and return
the value 3 columns to the right and DOG is in Colum A in rows 3,5, and
7 and in column C row 3 is the word RED, and column C row 5 is the word
WHITE and column C row 7 is the word BLUE. The way vlookup works it
will only return the word RED, I want it to return RED, WHITE and BLUE.

Is this not correct?








Don Guillett wrote:
you can do this with vlookup by expanding your range and just using the
column desired
OR
you can use match to find the row and put that in an index formula
or
use offset

--
Don Guillett
SalesAid Software

"Little Penny" wrote in message
oups.com...
I'm trying to get excel lookup a value and than search for that value
in a column and then return the value two columns to the right. I know
this sound like vlookup but I want excel to continue looking after it
finds the first instance of my lookup value because there maybe 3 or 4
instance of my lookup value that have different values two columns to
the right. How can I do this and what function should I use if

possible.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default search or vlookup help

Sorry, thought you wanted the last.

I can get them all in separate cells

Select say D1:d20, and in the formula bar, enter

=IF(ISERROR(SMALL(IF($A$1:$A$20="DOG",ROW($A1:$A20 ),""),ROW($A1:$A20))),"",
INDEX($C$1:$C$20,SMALL(IF($A$1:$A$20="DOG",ROW($A1 :$A20),""),ROW($A1:$A20)))
)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

You can concatenate then with

=D1&" " &D2&" " &D3&" " &D4&" " &D5

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Little Penny" wrote in message
ps.com...

A B C

1 CAT CAT GREEN
2 CAT CAT YELLOW
3 DOG CAT RED
4 CAT CAT ORANGE
5 DOG CAT WHITE
6 CAT CAT BLACK
7 DOG CAT BLUE

Thanks Bop for you rely. I modified your formula for the above example

=INDEX(C1:C100,MAX(IF(A1:A100="DOG",ROW(A1:A100))) )

I only get "BLUE" not "RED WHITE AND BLUE". I also made sure to use
Ctrl-Shift-Enter. How do I combine these value in to one cells or over
serveral cell.















Bob Phillips wrote:
=INDEX(C1:C100,MAX(IF(A1:A100="Bob",ROW(A1:A100))) )

which is an array formula, it should be committed with Ctrl-Shift-Enter,

not
just Enter.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Little Penny" wrote in message
ups.com...
But as I understand it vlookup will only return the first instance of

a
lookup value.
For example If I do a vlookup in column A for the word DOG and return
the value 3 columns to the right and DOG is in Colum A in rows 3,5,

and
7 and in column C row 3 is the word RED, and column C row 5 is the

word
WHITE and column C row 7 is the word BLUE. The way vlookup works it
will only return the word RED, I want it to return RED, WHITE and

BLUE.

Is this not correct?








Don Guillett wrote:
you can do this with vlookup by expanding your range and just using

the
column desired
OR
you can use match to find the row and put that in an index formula
or
use offset

--
Don Guillett
SalesAid Software

"Little Penny" wrote in message
oups.com...
I'm trying to get excel lookup a value and than search for that

value
in a column and then return the value two columns to the right. I

know
this sound like vlookup but I want excel to continue looking after

it
finds the first instance of my lookup value because there maybe 3

or 4
instance of my lookup value that have different values two columns

to
the right. How can I do this and what function should I use if

possible.





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default search or vlookup help

A B C

1 CAT CAT GREEN
2 CAT CAT YELLOW
3 DOG CAT RED
4 CAT CAT ORANGE
5 DOG CAT WHITE
6 CAT CAT BLACK
7 DOG CAT BLUE


E7=IF(ISERROR(SMALL(IF($A$1:$A$20="DOG",ROW($A1:$A 20),""),ROW($A1:$A20))),"",INDEX($C$1:$C$20,SMALL( IF($A$1:$A$20="DOG",ROW($A1:$A20),""),ROW($A1:$A20 ))))


Hey Bob if I copy and Paste your formula in cell E1. I only get red.
Should I paste the formula in three different cell to get red white
and blue. I little confused.



Thanks for your held.
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default search or vlookup help

Little Penny,

Don't put the formula in E1, select E1:E20, add the formula to the formula
bar, and then Ctrl-Shift-Enter it.

It is a block array formula, it applies to an array of cells, so must be
enter as one block.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Little Penny" wrote in message
...
A B C

1 CAT CAT GREEN
2 CAT CAT YELLOW
3 DOG CAT RED
4 CAT CAT ORANGE
5 DOG CAT WHITE
6 CAT CAT BLACK
7 DOG CAT BLUE



E7=IF(ISERROR(SMALL(IF($A$1:$A$20="DOG",ROW($A1:$A 20),""),ROW($A1:$A20))),""
,INDEX($C$1:$C$20,SMALL(IF($A$1:$A$20="DOG",ROW($A 1:$A20),""),ROW($A1:$A20))
))


Hey Bob if I copy and Paste your formula in cell E1. I only get red.
Should I paste the formula in three different cell to get red white
and blue. I little confused.



Thanks for your held.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP - search key is more than once available MCFD Excel Worksheet Functions 2 May 14th 09 12:05 PM
vlookup with search? maryj Excel Worksheet Functions 5 May 8th 06 07:10 PM
vlookup - after exhaustive search jgriffs Excel Programming 2 February 4th 06 12:25 PM
Can VLOOKUP be used to search for more than one possible value? Travis Excel Discussion (Misc queries) 1 August 31st 05 03:57 AM
vlookup & search tango Excel Programming 0 October 27th 04 10:18 AM


All times are GMT +1. The time now is 11:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"