+ Reply to Thread
Results 1 to 3 of 3

Create a macro to fill empty cell with product above

  1. #1
    Registered User
    Join Date
    03-04-2024
    Location
    Ireland
    MS-Off Ver
    2016
    Posts
    1

    Post Create a macro to fill empty cell with product above

    Hi, I hope you are well.

    I have been trying to solve for quite a while and hoping i could leverage some knowledge on here!

    We have a sheet that provides us with lines of products. If the customer ads 5 of the same product throughout the year. There will be 5 lines of code however on the first line has the product name. (see image attached for an example)

    I need a loop that will copy down the product name until another product is met. Once another product is met I need it to call the loop again all the way down the sheet so each line has a product name associated with it. (Could be 20 plus products but for this example I have only included 2).

    All help appreciated I cant seem to figure this out!!

    Thanks
    AM
    Attached Images Attached Images

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Create a macro to fill empty cell with product above

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Create a macro to fill empty cell with product above

    Macro code
    Please Login or Register  to view this content.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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. Help with macro to fill empty cells with value from cell above.
    By Cam in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-18-2017, 03:50 AM
  2. Macro Fill Empty Cells
    By BillyBoy86UK in forum Hello..Introduce yourself
    Replies: 4
    Last Post: 02-09-2017, 09:38 PM
  3. [SOLVED] How to create a dynamic range if the last cell is empty and the columns have empty cells
    By peter_swe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2016, 11:18 PM
  4. Replies: 0
    Last Post: 08-03-2016, 07:01 PM
  5. Create Macro to fill cell with text charters into cell that selected
    By jk3700 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2016, 09:58 PM
  6. Macro to fill empty cells
    By wonderd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2014, 02:25 AM
  7. Create macro to fill multiple cells from input in one cell
    By codilaine in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-29-2011, 03:56 AM

Tags for this Thread

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