Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / April 2007

Tip: Looking for answers? Try searching our database.

VLOOKUP Newbie Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike C - 18 Apr 2007 00:05 GMT
I would like to pull back all the columns that match the lookup_value by
copying and pasting the VLOOKUP formula, but the column_index_num stays
the same.  Instead of changing the column_index_num manually in each
cell is there a formula or value that will increase it by 1 when I drag
the formula to the adjacent cells?

=VLOOKUP(A2,Products!$A$2:$Z$100,2,FALSE)
=VLOOKUP(A2,Products!$A$2:$Z$100,3,FALSE)
=VLOOKUP(A2,Products!$A$2:$Z$100,4,FALSE)
=VLOOKUP(A2,Products!$A$2:$Z$100,5,FALSE)

Thanks for the help.

Mike
Bob Phillips - 18 Apr 2007 00:12 GMT
If you are dragging it across

=VLOOKUP(A2,Products!$A$2:$Z$100,COLUMN(B1),FALSE)

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

>I would like to pull back all the columns that match the lookup_value by
>copying and pasting the VLOOKUP formula, but the column_index_num stays the
[quoted text clipped - 10 lines]
>
> Mike
Teethless mama - 18 Apr 2007 00:14 GMT
Assuming you're dragging down

=VLOOKUP($A$2,Products!$A$2:$Z$100,ROW(A2),FALSE)

> I would like to pull back all the columns that match the lookup_value by
> copying and pasting the VLOOKUP formula, but the column_index_num stays
[quoted text clipped - 10 lines]
>
> Mike
JE McGimpsey - 18 Apr 2007 00:14 GMT
Are your "adjacent cells" to the right?

Then you could use COLUMN()

for instance, if the VLOOKUP is in cell D4:

D4:     =VLOOKUP($A2,Products!$A$2:$Z$100,COLUMN(B1),FALSE)

Then copy to the right.

> I would like to pull back all the columns that match the lookup_value by
> copying and pasting the VLOOKUP formula, but the column_index_num stays
[quoted text clipped - 10 lines]
>
> Mike
Pete_UK - 18 Apr 2007 00:15 GMT
Instead of putting 2, 3, 4 etc you can use COLUMN(). This will return
2 if the formula is in column B, 3 for column C etc, so you may need
to add or subtract a constant to make it return 2 for the first column
you use it in.

Hope this helps.

Pete

> I would like to pull back all the columns that match the lookup_value by
> copying and pasting the VLOOKUP formula, but the column_index_num stays
[quoted text clipped - 10 lines]
>
> Mike
Gord Dibben - 18 Apr 2007 03:11 GMT
One more method.

Select 4 cells.  Type this is active cell.

=VLOOKUP(A2,Products!$A$2:$Z$100,{2,3,4,5},FALSE)

CTRL + SHIFT + ENTER to enter.

Gord Dibben  MS Excel MVP

>I would like to pull back all the columns that match the lookup_value by
>copying and pasting the VLOOKUP formula, but the column_index_num stays
[quoted text clipped - 10 lines]
>
>Mike
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.