Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vlookup ?
I need to know how to do a vlookup and then pull all the data under it in the
field that is the same as the lookup. ie i am looking up ford and in the lookup range there is more than 1 ford in a row? so lookup range is sheet1a2:ac1040. ford is in cells a407 thur a597. i need to pull a407 thur ac407 in row 1 of sheet2 i know the formula for that what i am having a hard time with is row2 of sheet 2 needs to be filled with a408 thur ac408. can some one help me with this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
vlookup ?
Your description isn't very clear. The code below "may" work, but if not use
it as a model or be a little clearer what you are looking for. Sub findford() Set Lookuprange = Sheets("Sheet1").Range("a2:a1040") Sh2RowCount = 1 For Each cell In Lookuprange If cell = "ford" Then With Sheets("Sheet1") .Range(.Cells(cell.Row, "A"), _ .Cells(cell.Row, "AC")).Copy _ Destination:= _ Sheets("Sheet2").Cells(Sh2RowCount, "A") Sh2RowCount = Sh2RowCount + 1 End With End If Next cell End Sub "lee willis" wrote: I need to know how to do a vlookup and then pull all the data under it in the field that is the same as the lookup. ie i am looking up ford and in the lookup range there is more than 1 ford in a row? so lookup range is sheet1a2:ac1040. ford is in cells a407 thur a597. i need to pull a407 thur ac407 in row 1 of sheet2 i know the formula for that what i am having a hard time with is row2 of sheet 2 needs to be filled with a408 thur ac408. can some one help me with this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If (Vlookup 0) working, but what if Vlookup cell does not exist | Excel Worksheet Functions | |||
VLookUp - Does the VLookUp return the exact information? | Excel Worksheet Functions | |||
using a vlookup to enter text into rows beneath the vlookup cell | Excel Programming | |||
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP | Excel Discussion (Misc queries) | |||
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) | New Users to Excel |