Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autofill with the Vlookup function

Status
Not open for further replies.

deante

Technical User
May 26, 2005
34
US
I have a data set that uses Vlookup functions to retrieve a value from the row above it. Here is an example:

Step Rate Next Day Rate
50 30
49 25 30
48 35 25
47 20 35
etc
etc

I could manually do the Vlookup functions but there are nearly 2000 and could be more depending on the day. If there anyway I can use an autofill function instead of inputting each individually?

Thanks in Advance
 
Sorry, I don't follow. Why do you need the VLOOKUP? If 30, 25, 35 and 20 are in cells B2:B5 then why can't cell c3 just have the formula =B2 ?

Stupidity has no handicap
 
Sorry I did not explain. Because that particular value may not always be in that cell. One day the data could look like this:

Type Step Rate Next Day Rate
1 51 40
1 50 30 40
1 49 25 30
1 48 35 25
1 47 20 35
2 30 20
2 29 35 20
2 28 30 35
etc

The next day could be:

Type Step Rate Next Day Rate
0 20 30
0 19 25 30
0 18 30 25
0 17 35 30
1 51 40
1 50 30 40
1 49 25 30
1 48 35 25
1 47 20 35
2 30 20
2 29 35 20
2 28 30 35

etc

Then the cell reference would not bring me to the cell I desire. I need the Vlookup to find the cell with the rate from the step before from the same type

 
Still, if Type is in columns A, Step in B, Rate in C, then formula in D2 will be

=IF(A2=A1,C1,"")

Stupidity has no handicap
 
It appears to have worked. Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top