+ Reply to Thread
Results 1 to 8 of 8

Populate Listbox2 based on value selected in ListBox1 with multiple worksheets data

Hybrid View

hecgroups Populate Listbox2 based on... 01-05-2016, 11:03 AM
Keebellah Re: Populate Listbox2 based... 01-05-2016, 11:48 AM
hecgroups Re: Populate Listbox2 based... 01-05-2016, 11:55 AM
Keebellah Re: Populate Listbox2 based... 01-05-2016, 12:00 PM
Keebellah Re: Populate Listbox2 based... 01-05-2016, 06:04 PM
hecgroups Re: Populate Listbox2 based... 01-05-2016, 11:04 PM
hecgroups Re: Populate Listbox2 based... 01-06-2016, 10:17 AM
Keebellah Re: Populate Listbox2 based... 01-06-2016, 11:38 AM
  1. #1
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    909

    Populate Listbox2 based on value selected in ListBox1 with multiple worksheets data

    Looking for a help to populated data from listbox1 to listbox2.

    When a user enters a text and hit search button the first listbox is listing the provider name with year. There will be multiple years for the specific provider. Let say I am searching “Quba” it will give me to entries as mentioned below.

    Al Dar Hospital (Quba) - 2014
    Al Dar Hospital (Quba) - 2015

    What I need here is when I click on Al Dar Hospital (Quba) – 2015 on listbox2 will list only those batches information from worksheet (Resubmission Adjustment) for example below

    Column B Column C Column G
    Batch No Date Amount
    NB20150929-4945 22-12-2015 25.00
    NB20150803-3996 22-12-2015 25.00
    NB20150824-4424 22-12-2015 25.00

    I hope I have explained my request good to make you understand better.

    Sample file is attached worksheets (Output)

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Populate Listbox2 based on value selected in ListBox1 with multiple worksheets data

    Clear, I imagine you haven't tried yourself yet?
    So what you really want is only the cells that containg that value in Resub... worksheet.
    That means the extra three rows you see, but if you don't select them you only want to display them, right?
    What if there are no 'resubmission adjusmtents' like in 2014?
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    909

    Re: Populate Listbox2 based on value selected in ListBox1 with multiple worksheets data

    Honestly I did not understand what you are asking but I will give a simple example.

    I am searching Quba work the first listbox will give me Quba with 2 years (But can be more) then if I select Al Dar Hospital (Quba) - 2014 in listbox1, the listbox2 will show me all the resub batches within that year I.e. 2014 from worksheet Resubmission Adjustment.

    if I did not select any thing in listbox1 it will be blank.

    I hope I have explained correctly.

    sorry about the poor language grammar

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Populate Listbox2 based on value selected in ListBox1 with multiple worksheets data

    I understand. No problem

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Populate Listbox2 based on value selected in ListBox1 with multiple worksheets data

    I think this will do.
    It took some time to figure out

  6. #6
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    909

    Re: Populate Listbox2 based on value selected in ListBox1 with multiple worksheets data

    thanks for the help let me implemented on my original and get back to you.

  7. #7
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    909

    Re: Populate Listbox2 based on value selected in ListBox1 with multiple worksheets data

    Thanks Keeb it works.

    Topic marked as solved

  8. #8
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Populate Listbox2 based on value selected in ListBox1 with multiple worksheets data

    You're welcom, glad to have been able to help you out with it

+ 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] Copy selected item from listbox1 to listbox2 unless already exists in listbox2
    By D.Lovell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2014, 07:00 PM
  2. [SOLVED] UserForm : Want to link Listbox1 with Listbox2 and delete data with one button
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-01-2014, 11:18 AM
  3. [SOLVED] Listbox1 items to move in Listbox2.
    By siobeh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-14-2014, 03:18 PM
  4. [SOLVED] Transfer data from Userform1.listbox1 to userform2.listbox2
    By Vbadept in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-04-2013, 08:28 AM
  5. [SOLVED] Populate Listbox2 based on Listbox1 selection
    By Aland2929 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2013, 09:04 AM
  6. Populate Listbox2 from Listbox1 selection
    By Macro1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-01-2010, 07:06 AM
  7. [SOLVED] Listbox1 to Listbox2?
    By Moretakitty in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 01-20-2005, 07:06 PM

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