+ Reply to Thread
Results 1 to 6 of 6

Listbox not showing all the data needed

Hybrid View

  1. #1
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,892

    Re: Listbox not showing all the data needed

    Welcome to the Forum KH97!

    The issue seems to be "duplicates with slightly different information". If they have slightly different information, they are not duplicates. Your code looks for a case-insensitive exact match. What do you want instead?

    By the way, the If statement logic is redundant. The current line of code is

    If H = 1 And LCase(Sheet1.Cells(i, J)) = LCase(Me.TextBox1) Or H = 1 And Sheet1.Cells(i, J) = Val(Me.TextBox1) Then
    but you can get identical results with

    If H = 1 And LCase(Sheet1.Cells(i, J)) = LCase(Me.TextBox1) Then
    Also, it would enhance the readability of the code if it were indented to show structure.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  2. #2
    Registered User
    Join Date
    09-27-2019
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Listbox not showing all the data needed

    Thanks for the reply 6String.

    Currently on my spreadsheet the columns are:

    Company - Centre Number - Product Code - Quantity - Notes

    And i have multiple different lines going in with the same Centre number and same company.
    But when i use the textbox to search it only pulls back one line from one of the orders.

    For example in the spreadsheet i have the lines:

    UKD - 101 - 105A
    UKD - 101 - 105B

    But if i search UKD or 101 i will only get one of those lines back and i need to be able to pull anything to do with what i'm searching back.

    If that makes sense.

    Thanks

+ 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. Showing search result in listbox
    By Mahmoudelnemr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2019, 07:45 AM
  2. Listbox showing data searched in a sheet using the given combobox value
    By minominuccio in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-21-2017, 10:34 AM
  3. ListBox Is not showing Headers (UserForm)
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-30-2017, 08:38 AM
  4. Not showing value time in TextBox and ListBox
    By Seeuw in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 12-14-2013, 06:27 AM
  5. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  6. Listbox is showing data from outside the range set?
    By Smurlos in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2010, 08:41 AM
  7. Showing data from specific columns in a listbox
    By Smurlos in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-21-2010, 11:13 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