+ Reply to Thread
Results 1 to 4 of 4

copy value from above

  1. #1
    Registered User
    Join Date
    10-08-2016
    Location
    PAKISTAN
    MS-Off Ver
    OFFICE 2010
    Posts
    68

    copy value from above

    i want to copy value from above cell and paste up to 5 NON-Blank cells only
    a file is attached
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: copy value from above

    Could you fill in the expected results?
    Quang PT

  3. #3
    Registered User
    Join Date
    10-08-2016
    Location
    PAKISTAN
    MS-Off Ver
    OFFICE 2010
    Posts
    68

    Re: copy value from above

    No, time consuming it contains data up to 25,000 rows and takes lot of time. i need some VBA code
    Last edited by asad.ermo; 06-03-2020 at 10:19 PM.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,569

    Re: copy value from above

    I don't believe that bebo was suggesting you do all the work manually, just asking if you could fill in the blank spaces in your sample file so that we have something with which to compare the results of our proposed formula/code.
    That said I feel that I have an idea as to what you want and a way to get it using a formula:
    1. Insert a new row one.
    2. Put the following formula into cell C2: =IF(B2<>"",B2,IF(A2<>"",C1,""))
    3. Copy down as far as needed
    4. While the cells in column C are still selected copy (Ctrl + c) and paste special values (Ctrl + Alt + v > values) and then press the Esc key
    5. While the cells in column C are still selected pull the column over to column B. You will be asked if you want to replace the data that is already in column B, select OK.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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: 6
    Last Post: 01-29-2020, 07:46 AM
  2. Replies: 6
    Last Post: 02-28-2018, 09:40 AM
  3. [SOLVED] Change Copy to Copy & Mirror Image the Copy
    By mills49 in forum Excel General
    Replies: 5
    Last Post: 08-21-2014, 05:25 AM
  4. [SOLVED] Macro to copy cell width to new sheets (ie copy original sheet format)
    By teenyjem in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-20-2013, 07:28 AM
  5. Save copy as, open copy, alter copy, save copy and close copy
    By tradinup2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-03-2013, 04:42 PM
  6. Copy one cell to an other but colors do not copy. While not using clipboard to copy.
    By chuckchuckit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2010, 03:08 AM
  7. EXCEL FILE a copy/a copy/a copy ....filename
    By ve in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 09-29-2005, 05:05 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