+ Reply to Thread
Results 1 to 4 of 4

VBA code to find blanks and populate corresponding unique row values

  1. #1
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    VBA code to find blanks and populate corresponding unique row values

    Hello, please see the attached file. The command button in Sheet1 opens a userform. I want to click the button in the userform and have the below performed:

    The code will search the 'Value' column in the 'infosheet' tab. Wherever there is a blank value cell, I want the corresponding Prefix value for that row to be populated in Label2 however ignoring/avoiding duplicates.

    Therefore in the attached example, the Label2 should be populated with the below:

    BATCH 2
    BATCH 3
    BATCH 9

    Please help me with the code to achieve this task. Thank you!
    Attached Files Attached Files
    If you have received help from a user, please feel free to Rep that person.
    Also, do remember to click Thread Tools and mark your thread as solved, if you have achieved a solution to your thread.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: VBA code to find blanks and populate corresponding unique row values

    What about BATCH 5

    I suggest using a listbox and not a label...
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by sintek; 05-24-2023 at 04:41 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    Re: VBA code to find blanks and populate corresponding unique row values

    Yes BATCH 5 also

    This worked great and thank you very much! Repped.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: VBA code to find blanks and populate corresponding unique row values

    Glad to have helped...tx for rep +

+ 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. Replies: 3
    Last Post: 12-08-2022, 10:20 PM
  2. Replies: 2
    Last Post: 08-20-2021, 01:06 PM
  3. Replies: 2
    Last Post: 07-30-2018, 02:21 PM
  4. Find all unique values based on multiple criteria, excluding blanks
    By Tamarissa in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-29-2018, 08:12 PM
  5. Replies: 2
    Last Post: 02-13-2013, 03:14 PM
  6. Replies: 3
    Last Post: 12-13-2011, 08:00 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