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 / New Users / January 2007

Tip: Looking for answers? Try searching our database.

Finding Data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
colinfraser@prosealuk.com - 04 Jan 2007 09:11 GMT
In column A i have numbers 1 to 50,  (i.e. A1 =1, A2=2 etc thes
represent product boxes) in column B I have a "random" list of product
(i.e. B1=Walnuts, B2 = oranges, b3 = walnuts).

I need a formula to be able to summarize (in a seperate cell) whic
products are in which boxes, I cannot use data filter for this, it mus
be a formula (if possible).
Example: If I create a list of products in column Z. In the next colum
I want the relevant box numbers to appear  I.E. if  "walnuts" were i
cell Z1 then the box numbers 1 & 3 would appear in the cell AA1.
I hope this is clear
Thanks for looking at this proble

--
colinfraser@prosealuk.co

Posted from - http://www.officehelp.i
Bernard Liengme - 04 Jan 2007 14:28 GMT
The function VLOOKUP would work if you data was in the other order (column A
having product and B having box number)
So you need to use MATCH to find the position of the product in your data
list
Z1:Z50 have product names
AA1 use =MATCH(Z1,B1:B50)
So if Z1 had "walnuts" (no quotes) the formula would return 3 since this is
in A3
But if you numbers are not in order then in AB1 use =INDEX(A1:A50,AB1)
or combine the two as =INDEX(A1:A50,MATCH(Z1,B1:B50,0))

Alternatives: you could (a) copy the list and sort it or (b) use a pivot
table
best wishes
Signature

Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

> In column A i have numbers 1 to 50,  (i.e. A1 =1, A2=2 etc these
> represent product boxes) in column B I have a "random" list of products
[quoted text clipped - 8 lines]
> I hope this is clear
> Thanks for looking at this problem
colinfraser@prosealuk.com - 05 Jan 2007 09:33 GMT
Hi Bernard,
Thanks for your reply, I have tried your solution but I can only fin
the first box cotaining certain products, i.e. walnuts are in boxes 2
& 34, only box 25 is found.
I must admit I struggle with pivot tables so I try to avoid them wher
possible. Any other ideas?
Thanks
Coli

--
colinfraser@prosealuk.co

Posted from - http://www.officehelp.i
KC Rippstein - 05 Jan 2007 15:48 GMT
You will have to use an array formula.  Here's what you do.
Let's assume A1 is a header name "Box No." and B1 is a header name Product.
We're going to skip over column C and start your report in column D.
First, you need to filter column B for unique records.  Put that list
wherever you like on the page (down in A100 is fine).
Take that list, delete the header, and sort it.  Then cut the list, go to
cell E1, and Paste Special -> Transpose.
Now all your unique products are across the top in E1, F1, G1, etc.
In D2, enter "Total Boxes" without quotes and right align it.
In D3, enter "Box List" without quotes and right align it.
In E2, =COUNTIF(B:B,E1) and use the fill handle to drag that formula across
for all your products.  You might change the format of your first two rows
to make them stand out as your header (bold font and colored background).
Now for the list you are looking for.
In E3, you have to enter an array formula, which is committed using
Ctrl+Shift+Enter (or CSE).
So in E3, =INDEX(A:A,SMALL(IF($B$2:$B$1000=E$1,ROW($2:$1000)),ROW(2:2))) and
don't forget to CSE.
Now use the fill handle to drag this formula across as many columns as you
need and down as many rows as you think you'll need (for instance, if you'll
have no more than 20 boxes at a time of any one product, drag the formula
down 25 rows to be safe).
You will get the #NUM! error once you run out of boxes, so you'll want to
conditional format those cells.  Highlight E3 to the end of your range and
then Format -> Conditional Format -> Formula Is =ISERROR(E3) then change the
font to white.
You're done!!!
- KC

> Hi Bernard,
> Thanks for your reply, I have tried your solution but I can only find
[quoted text clipped - 4 lines]
> Thanks
> Colin
KC Rippstein - 05 Jan 2007 16:04 GMT
One more thing...you should change my 1000 boxes assumption to something
more reasonable for you.  If you'll never have more than 500 boxes of
inventory at any time, then end the array formula at row 600 instead of
1000.
Array formulas look at every row one at a time to run the test.  So in the
example I gave you, it would search all 1000 rows 25 times for each product.
So it is performing 25,000 calculations per product times every single
product every time you update your list.  As you can imagine, it takes a
little time to perform 25,000 calculations times 20 products (or half a
million calculations), so be sure to keep that array formula within as
reasonable a constraint as makes sense for your business.

> You will have to use an array formula.  Here's what you do.
> Let's assume A1 is a header name "Box No." and B1 is a header name
[quoted text clipped - 35 lines]
>> Thanks
>> Colin

Rate this thread:






 
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.