Report

Searching for values and creating a list [Solved]

Ask a question kswing 4Posts Friday November 18, 2016Registration date November 18, 2016 Last seen - Last answered on Nov 18, 2016 at 03:08 PM by yg_be
Hi there,
I hope you can help me, so far I have managed to create a formula which searches a range of data (SKU’s) and returns a count of the occurrences of that SKU. The search includes where the SKU forms part of a larger group of SKU’s. E.g. SKU ‘PL009’ is listed as ‘PL009’, ‘PL009 SB420’ and ‘SB010 PL009 SK008’ and therefore my formula returns the value 3 which is what I want. The formula i have used is this: =COUNTIF(Q$2:Q$786,"*"&T2&"*")



I would now like to go one step further and for the SKU’s where the count is more than one I would like the values to be returned in a list linked to the SKU searched for. Should i be using a pivot table? I'm a bit green with excel and please i'd managed to get as far as i have but i'm now stumped!

Any help would be appreciated.
Thanks
Kathryn
See more 
Helpful
+0
plus moins
Kathryn,
I assume your SKUs are in column Q. What do you have in T2, and, perhaps, in whole column T? Where is the formula stored?
It is hard to assist you because you do not actually describe what you globally need to achieve.
kswing 4Posts Friday November 18, 2016Registration date November 18, 2016 Last seen - Nov 18, 2016 at 09:06 AM
Hi,

Thank you for replying. To clarify

Column T contains the singular list of SKU's i.e. 'PLU009'. There are 664 of these in total. Column Q is a complete list of our SKU's including those in column T (786 in total), it includes the single instance i.e PLU009 and any combination of it. e.g 'PLU009 SB009'.

Having done a simple count of the instances the SKU's (Column U) I now want to have the detail behind that count. E.g where column U shows 3, i want the data behind the count so that i can see in real terms 3 is actually PLU009, ‘PL009 SB420’ and ‘SB010 PL009 SK008’. I hope that makes sense
Reply
Leave a comment
Helpful
+0
plus moins
Suggestion :
1) create the following function :
Option Explicit
Function skus(inp As Range, sing_sku As String) As String
    Dim cell As Range
    skus = ""
    For Each cell In inp
        If InStr(cell, sing_sku) > 0 Then
            skus = skus + "|" + CStr(cell.Value)
        End If
    Next
End Function

2) use following formula :
=SKUS(Q$2:Q$786,T2)
kswing 4Posts Friday November 18, 2016Registration date November 18, 2016 Last seen - Nov 18, 2016 at 09:42 AM
Thanks, this looks interesting.. I'm really sorry but where and how do i create the function?
Reply
yg_be 3092Posts lundi 9 juin 2008Registration date ContributorStatus August 16, 2017 Last seen - Nov 18, 2016 at 10:05 AM
Does this help? https://support.office.com/en-us/article/Create-Custom-Functions-in-Excel-2007-2f06c10b-3622-40d6-a1b2-b6748ae8231f
Don't be sorry, Kathryn.
Reply
kswing 4Posts Friday November 18, 2016Registration date November 18, 2016 Last seen - Nov 18, 2016 at 02:49 PM
You are brilliant....I read the support notes and created the function you suggested, I now have the data I want. Thank you so so much!
Reply
yg_be 3092Posts lundi 9 juin 2008Registration date ContributorStatus August 16, 2017 Last seen - Nov 18, 2016 at 03:08 PM
thank you for your positive feedback, it was a pleasure to help you.
Reply
Leave a comment

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!