+ Reply to Thread
Results 1 to 8 of 8

populate cells with the same value as the cell above (same column)

  1. #1
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    populate cells with the same value as the cell above (same column)

    Hi,

    I have a huge file with data and I want to populate same cells with the value as the cell value above of it in column B, C, D if I have value in column G.
    I add a test file with before/after!

    Thank you very much for your help.
    Attached Files Attached Files
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: populate cells with the same value as the cell above (same column)

    Assumes your data begins in Row 1

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: populate cells with the same value as the cell above (same column)

    Hi,
    Thank you for your solution. I think we are on the right track.
    ...it cleared all 3 columns, B, C, D

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: populate cells with the same value as the cell above (same column)

    sorry..
    this is the original piece of data, it starts in row7
    01-Apr-17 187 73G BGF 93
    01-Apr-17 302 73G BGG 91
    01-Apr-17 364 73G BGF 81
    01-Apr-17 422 73G BGF 89
    01-Apr-17 647 AT5 ATG 32
    02-Apr-17 151 318 ASD 81
    02-Apr-17 152 318 ASD 81
    02-Apr-17 207 AT5 ATD 91
    02-Apr-17 273 AT5 ATG 99
    02-Apr-17 305 73G BGH 41
    02-Apr-17 321 73G BGF 81
    02-Apr-17 373 733 BGA 93
    373 733 BGA 81 -this is added by me
    02-Apr-17 374 733 BGA 93
    02-Apr-17 382 733 BGA 89


    after I run the code it gives me:
    01-Apr-17 187 73G BGF.........
    01-Apr-17 187 73G BGF
    01-Apr-17 187 73G BGF
    01-Apr-17 187 73G BGF
    01-Apr-17 187 73G BGF
    02-Apr-17 187 73G BGF
    02-Apr-17 187 73G BGF
    02-Apr-17 187 73G BGF
    02-Apr-17 187 73G BGF
    02-Apr-17 187 73G BGF
    02-Apr-17 187 73G BGF
    02-Apr-17 187 73G BGF
    187 73G BGF
    02-Apr-17 187 73G BGF
    02-Apr-17 187 73G BGF

    it should copy when it finds an empty cell...
    Last edited by john55; 05-07-2017 at 03:52 PM.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: populate cells with the same value as the cell above (same column)

    Try changing this line of code
    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    and change this line

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    Last edited by alansidman; 05-07-2017 at 04:15 PM.

  6. #6
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: populate cells with the same value as the cell above (same column)

    Thank you! that's it!

  7. #7
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: populate cells with the same value as the cell above (same column)

    John55,

    Since you have a 'huge" file it might be worth considering using special cells as it seems to be faster. (although you might as well test on your data)
    http://www.contextures.com/xlDataEntry02.html
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  8. #8
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: populate cells with the same value as the cell above (same column)

    Thank you scottiex!

+ 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] Populate column with non-blank cells from another column
    By jwillis07 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-21-2014, 08:42 AM
  2. [SOLVED] Have textbox.value populate cells in a certain row and column
    By Templemind in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 09-14-2014, 06:09 AM
  3. Populate column with non-blank cells from another column
    By jwillis07 in forum Excel General
    Replies: 7
    Last Post: 09-04-2014, 09:19 AM
  4. Replies: 6
    Last Post: 05-16-2014, 03:03 PM
  5. [SOLVED] Auto populate cells in one column based if cells in next column are populated
    By diablo86 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-22-2013, 06:29 AM
  6. Populate cells with information in different column and row
    By ExcelFed in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-24-2013, 01:48 PM
  7. Cells in one row contain data that will populate a different column
    By seisea in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2013, 03:50 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