+ Reply to Thread
Results 1 to 2 of 2

Display Items of selected Category

  1. #1
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Display Items of selected Category

    Hello,
    I have a Table as shown on the attached spreadsheet.

    I have a variable defined as MyCurrentCateg = "Fruit"

    I want a message box to display all the Fruits; The corresponding Price; the corresponding Vendor.

    Could you please help?
    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this ‼


    Without seeing your code, a demonstration as a beginner starter :

    PHP Code: 
    Sub Demo()
      Const 
    "TRANSPOSE(IF(#=""¤"",ROW(#)))"
        
    Dim C$, VR&
            
    "Fruit"
        
    With Sheet1.UsedRange
            
    If Application.CountIf(.Columns(1), C) = 0 Then Beep: Exit Sub
            V 
    = .Parent.Evaluate(Replace$(Replace$(F"#", .Columns(1).Address), "¤"C))
            
    V(1) = 1
            V 
    Application.Index(.Value2Application.Transpose(Filter(VFalseFalse)), [{2,3,4}])
        
    End With
        
    For 1 To UBound(V)
            
    V(R1) = V(R1) & String(+ (Len(V(R1)) > 9), vbTab) & V(R2) & vbTab V(R3)
        
    Next
            MsgBox Join
    (Application.Transpose(Application.Index(V, , 1)), vbLf), , C
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 06-22-2019 at 08:59 PM. Reason: adding a control …

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sum all grouped items from each category
    By Iboughtthefarm.ca in forum Excel General
    Replies: 8
    Last Post: 08-11-2016, 03:37 PM
  2. UserForm ComboBox ONLY display selected items in List
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-16-2015, 01:02 PM
  3. Replies: 0
    Last Post: 04-09-2014, 04:21 PM
  4. Pivot Report Filter - Readout/Display selected items in a cell
    By FixandFoxi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2012, 10:19 AM
  5. Replies: 1
    Last Post: 09-03-2012, 10:03 PM
  6. Display selected report filter items
    By prahlad in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-28-2009, 07:20 AM
  7. Replies: 1
    Last Post: 06-24-2005, 12:21 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1