Results 1 to 5 of 5

Thread: Return an specific value tied to a column

  1. #1
    Neophyte BBrider's Avatar
    Join Date
    Dec 2018
    Posts
    2
    Articles
    0
    Excel Version
    Professional Plus 2013

    Return an specific value tied to a column



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello guys

    It is a little difficult to explain in the Title what I am looking for. Basically I have a massive set of data is the below format.

    What I am looking for is return the week number of the associated cell that contains the first time an organization shows up. Better with an example...
    The first time Company B shows up is in A10 so I want a formula or code that returns the value 31 (C10).

    Let me know please! Thank you!

    Click image for larger version. 

Name:	Capture.JPG 
Views:	12 
Size:	51.2 KB 
ID:	8678
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Capture.PNG 
Views:	10 
Size:	9.3 KB 
ID:	8675   Click image for larger version. 

Name:	Capture.PNG 
Views:	8 
Size:	20.4 KB 
ID:	8676   Click image for larger version. 

Name:	Capture.JPG 
Views:	7 
Size:	54.4 KB 
ID:	8677  

  2. #2
    Seeker gue's Avatar
    Join Date
    Nov 2018
    Posts
    9
    Articles
    0
    Excel Version
    Office Professional Plus 2016
    put thisfunction into a module and use it as user defined function on your excel.
    parameter1 - company name to search for
    parameter2 - select range of companies
    parameter3 - select range of values (weeks)


    Code:
    Function fFindMin(sSearchStr As String, rgSearchStr As Range, rgValues As Range) As Variant
    
    
      Dim vStr As Variant
      Dim vVal As Variant
      Dim i As Integer
      
      findMin = Null
      vStr = rgSearchStr
      vVal = rgValues
      
      If UBound(vStr, 1) = UBound(vVal, 1) Then
        For i = LBound(vStr, 1) To UBound(vStr, 1)
          If rgSearchStr(i, 1) = sSearchStr Then
            findMin = vVal(i, 1)
            Exit For
          End If
        Next
      End If
    End Function

  3. #3
    Acolyte Fluff's Avatar
    Join Date
    Sep 2018
    Posts
    33
    Articles
    0
    Excel Version
    2013
    Hi & welcome to the board.
    How about

    Excel 2013 32 bit
    A
    B
    C
    D
    E
    F
    1
    Organization Month Week
    2
    Company C
    7
    29
    Company B
    31
    3
    Company A
    7
    30
    4
    Company A
    7
    30
    5
    Company A
    7
    31
    6
    Company B
    7
    31
    7
    Company B
    7
    32
    Sheet: data

    Formula in F2
    =INDEX(C2:C7,MATCH(E2,A2:A7,0))
    Last edited by Fluff; 2018-12-05 at 08:16 PM.

  4. #4
    Neophyte BBrider's Avatar
    Join Date
    Dec 2018
    Posts
    2
    Articles
    0
    Excel Version
    Professional Plus 2013

    Exclamation

    @Fluff

    That is perfect... never thought it was that simple. Thanks!
    Last edited by Pecoflyer; 2018-12-06 at 08:50 AM. Reason: Removed unnecessary quote

  5. #5
    Acolyte Fluff's Avatar
    Join Date
    Sep 2018
    Posts
    33
    Articles
    0
    Excel Version
    2013
    Glad to help & thanks for the feedback

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •