Solved

Vlookup with a repetitive data

Posted on 2013-01-08
8
303 Views
Last Modified: 2013-01-09
Hi! This is my current basic formula: =VLOOKUP($C2,Structure!$A$2:$C$979,3,FALSE)

how do I need to adjust the formula if data in column C remains the same 14 times before it switches to another number that repeats 14 times (or goes 14 rows down)

thanks
0
Comment
Question by:Ladkisson
  • 4
  • 3
8 Comments
 
LVL 13

Expert Comment

by:Shanan212
ID: 38756545
=VLOOKUP(indirect("$C"&2+14*D1),Structure!$A$2:$C$979,3,FALSE)

^ Something like that should work

D1 put 0
D2 put 1
D3 put 2 (and so on)
0
 

Author Comment

by:Ladkisson
ID: 38756630
nope it did not work... I am attaching file for your reference: tab "Data" column B and A need to be mapped to the Info tab. Thanks!!
Vlookup-with-repetitive-data.xlsx
0
 
LVL 13

Expert Comment

by:Shanan212
ID: 38756702
See attached. The 'D' rows has to be vertical
Vlookup-with-repetitive-data.xlsx
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 38756722
There was really nothing wrong with your original formula.

Using your sample attachment, I used this formula in Data!A3...

=VLOOKUP($C3,Info!$A$2:$C$979,2,FALSE)

and this in Data!B3...

=VLOOKUP($C3,Info!$A$2:$C$979,3,FALSE)

I then copied those formulas down through A13790:B13790

For more about VLOOKUP, please see: http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/A_2637-Six-Reasons-Why-Your-VLOOKUP-or-HLOOKUP-Formula-Does-Not-Work.html
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Ladkisson
ID: 38756778
Shanan212: your formula does not work...you can use the file that you populated with the suggested formula...you can see how it changes...the idea is that one store is assigned to one region. this is what you have:
Region      Store
21      1
2      1
21      1
2      1
102      1
7      1
21      1
84      1
104      1
2      1
5      1
100      1
5      1
56      1
but they all should have region 21. Please refer to the attached file. I put filter in the "Info" tab to show that one store = one region. The thing is that in tab Data store numbers repeat 14 times before it moves on to the next number.
Vlookup-with-repetitive-data.xlsx
0
 
LVL 13

Expert Comment

by:Shanan212
ID: 38756839
Ok I am confused here though.

What result do you want to see? Something like this?

YOU WANT THIS? (A) OR      THIS (B)      
21      1            21      1
21      1                  1
21      1                  1
21      1                  1
21      1                  1
21      1                  1
21      1                  1
21      1                  1
21      1                  1
21      1                  1
21      1                  1
21      1                  1
21      1                  1
21      1                  1
3      2             3      2
3      2                   2
3      2                   2
3      2                   2
3      2                   2
3      2                  2
3      2                  2
3      2                  2
3      2                  2
3      2                  2
3      2                  2
3      2                  2
3      2                  2
3      2                  2
0
 

Author Comment

by:Ladkisson
ID: 38756887
option A
0
 
LVL 13

Accepted Solution

by:
Shanan212 earned 300 total points
ID: 38757582
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now