+ Reply to Thread
Results 1 to 7 of 7

Flatten and Fill From above (on empty cells) with exceptions

  1. #1
    Registered User
    Join Date
    08-02-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    4

    Question Flatten and Fill From above (on empty cells) with exceptions

    I have received a very weird data file, that looks somewhat like pivot. I need to flatten that file with "Fill From Above" approach. This ideally could have been easy with normal "fill from above" (i.e. [Ctrl+G] > Special > "Select Blanks" > Write a formula to fill previous row cell > [Ctrl+Enter] ), but in this occassion, as I have highlighted in the attached screenshot----- Not in all cases it should copy down the data from valued cell above, rather it should leave those cells empty, otherwise whole data representation will be wrong.

    Could someone help please? Any VBA code etc?
    Please try to give me a generic solution instead of going by codes with specific hard coding etc.

    Pivot.JPG

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Flatten and Fill From above (on empty cells) with exceptions

    I think you can just delete (shift up) one cell Above Devid under the Teacher column and delete two cells above Tom, 51 and 92 (Shift up) in the Student, student ID and Exam Score columns. That would allign everything.
    Last edited by JLGWhiz; 08-02-2020 at 11:59 AM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Flatten and Fill From above (on empty cells) with exceptions

    I am a little confused by your request. For the example you posted in Message #1, can you show us what the required result should look like?

    Also, if you posted a copy of the workbook you posted in Message #1 (see yellow banner near the top of this forum's window) it would help immensely (that way we don't have to spend the time recreating a workbook you already have).
    Last edited by Rick Rothstein; 08-02-2020 at 12:05 PM.

  4. #4
    Registered User
    Join Date
    08-02-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Flatten and Fill From above (on empty cells) with exceptions

    Apologies! I tried a lot to upload the file... But may be it is my browser issue when, I'm clicking on attachment clip icon, it's not fully expanding. So only option was for me to send the image. Earlier with original post I gave one image, and here now I'm posting the "TO BE"/"Target" image. Basically the goal is to roll forward Parent Level Information to Child Level.

    Attachment 689418

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Flatten and Fill From above (on empty cells) with exceptions

    The paper clip icon, does not work, please see the yellow banner at the top of the page for how to attach a file.

  6. #6
    Registered User
    Join Date
    08-02-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Flatten and Fill From above (on empty cells) with exceptions

    I am going to advance > manage attachment > uploading it from my pc (Sample Data.xlsx) it is showing uploaded.... then what???? How it will come to this post?
    I also tried adding it as a link.. then it told me, I can post link/video, etc etc.. only after couple of posts. God knows what that means.

  7. #7
    Registered User
    Join Date
    08-02-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    4

    Post Re: Flatten and Fill From above (on empty cells) with exceptions

    PFB the image where I was stuck. Managed to attach in this post finally

    Upload.JPG
    Attached Files Attached Files

+ 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: 5
    Last Post: 03-16-2018, 05:34 PM
  2. copy current cells and fill the empty cells below it consecutively
    By jitterbug888 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-09-2016, 10:34 PM
  3. Fill empty cells..
    By Ootso in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-14-2015, 04:30 AM
  4. [SOLVED] Fill Empty Cells
    By srikanthk in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-30-2012, 08:13 AM
  5. Fill empty cells with a 0
    By vbjon in forum Excel General
    Replies: 3
    Last Post: 08-05-2008, 10:44 PM
  6. [SOLVED] Fill empty cells
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-23-2006, 11:50 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