?
Solved

No Macros/vba: Offset Manipulation for data retrieval, 2 columns

Posted on 2010-01-09
5
Medium Priority
?
756 Views
Last Modified: 2012-05-08
I have two columns:
Item Color
shirt red
pants red
shirt blue
pants green
about 3000 rows
I'd like to add a third column that looks like this:
shirt red | shirts, pants
pants red | shirts, pants
shirts blue
pants green
goes on and on.
The first option to get the first red item is easy:
Assuming red is in G13 and the list starts in G12: =OFFSET(G14,MATCH(G14,$G$12:$G$2706,0),-1)
Finding populating the next items has proven more difficult.

I cannot use a macro for this, please take this into consideration.  Also, arrays prove to be unwieldy for the reporting tool during presentation.

Please advise & Happy New Year!
0
Comment
Question by:MMDCisco
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 26276382
Please post a workbook with at least 10 rows of data illustrating how you want it to look.

Kevin
0
 
LVL 29

Expert Comment

by:Badotz
ID: 26277100
Homework?
0
 
LVL 2

Author Comment

by:MMDCisco
ID: 26277403
No, not homework. Just an interesting problem I ran into last night when I came across a lookup issue for a small project.  I'm too old for homework.                                                                                                                                                        
eeclothes.xls
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 2000 total points
ID: 26279087
Place this array formula in cell C2 and copy to the rest of the result cells:

=IF(SUM((FREQUENCY(IF($B$2:$B$9=$B2,MATCH($A$2:$A$9,$A$2:$A$9,0)),ROW($A$2:$A$9)-ROW($A$2)+1)>0)*1)<=COLUMN()-COLUMN($C$2),"",INDEX($A$2:$A$9,SMALL(IF(FREQUENCY(IF($B$2:$B$9=$B2,MATCH($A$2:$A$9,$A$2:$A$9,0)),ROW($A$2:$A$9)-ROW($A$2)+1),ROW($A$2:$A$9)-ROW($A$2)+1),COLUMN()-COLUMN($C$2)+1)))

Press CTRL+SHIFT+ENTER to enter an array formula.

See the attached workbook.

Kevin
eeclothes.xls
0
 
LVL 2

Author Comment

by:MMDCisco
ID: 26279480
Dang.  I think it would have taken me 3 months to come up with that.  Thank you.  I do have far too many rows and calculations to make for this to run outside of a database but the solution is exactly as requested.

I did make some modifications for portability by using named ranges for obvious reasons.  Thank you.

MB
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

801 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