Closed Thread
Results 1 to 14 of 14

Pulling Data from List if cell blank then move to next

  1. #1
    Registered User
    Join Date
    04-16-2009
    Location
    Nottingham
    MS-Off Ver
    Excel 2000
    Posts
    7

    Pulling Data from List if cell blank then move to next

    As the title says really

    Trying to pull data from a list and if the cell above is empty then pull the data from the cell below and so on........

    I have some code for it..but its just a little bit too long and I can't use it

    This is what i have so far, trying to simplify it as its way to long to fit in a singel cell....i did think about breaking it down in to collums of either 8 or 6 and having it in chunks that way...but if i did that then i would still have to eventually use this forumla below as i don't really want huge gaps within the form i'm doing

    Please Login or Register  to view this content.
    Last edited by NightStalker; 04-17-2009 at 06:12 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Pulling Data from List if cell blank then move to next

    post an example of list and result you want/ but a simple way is as attached
    stuff in col a extracted in col b
    Attached Files Attached Files
    Last edited by martindwilson; 04-16-2009 at 05:56 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    04-16-2009
    Location
    Nottingham
    MS-Off Ver
    Excel 2000
    Posts
    7

    Re: Pulling Data from List if cell blank then move to next

    [page 1]
    1 - 0
    2 - 0
    3 - 0
    4 - 0
    5 - e
    6 - f



    [page 2]
    1 - if cell 1 on page 1 = 0 then return value in cell 2 in page 1 if cell 2 = 0 then return value in cell 3 page 1.......and so on
    2 - if cell 1 contains value from page 1 in cell 2 then return value in cell 3 if cell 3 = 0 then return value in cell 4 page 1.........and so on
    3 - as above
    4 - as above
    5 - as above



    Think of it as a domino effect
    Last edited by NightStalker; 04-16-2009 at 06:02 AM.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Pulling Data from List if cell blank then move to next

    so basicaly you just want to remove blank /0 cells from list
    and put on sheet 2
    use auto filter
    filter on does not =0 and does not = blank
    copy the rows displayed to sheet 2 (select entire row) anotherway with helper columns attached
    Attached Files Attached Files
    Last edited by martindwilson; 04-16-2009 at 08:48 AM.

  5. #5
    Registered User
    Join Date
    04-16-2009
    Location
    Nottingham
    MS-Off Ver
    Excel 2000
    Posts
    7

    Re: Pulling Data from List if cell blank then move to next

    Would that still work with the example below?


    Trying to take data from at least 6 sheets And then putting them into a list but i don't want huge gaps in the list due to no data in some one cells on lets say sheet 3

    eg


    sheet 1
    1 - a
    2 - b
    3 - c
    4
    5


    sheet 2
    1 - a
    2 - b
    3 - c
    4 - d
    5 - e


    sheet 3
    1 - a
    2 - b
    3
    4
    5


    sheet 4
    1 - a
    2 - b
    3 - c
    4 - d
    5

    Now to take the data from each of the sheets and put them in a list

    This is easy enough with the IF function but that would produce a list as below
    1 - a
    2 - b
    3 - c
    4
    5
    6 - a
    7 - b
    8 - c
    9 - d
    10 - e
    11 - a
    12 - b
    13
    14
    15
    16 - a
    17 - b
    18 - c
    19 - d
    20


    Would i then be able to pull the data needed with what you have given as an example? Logicaly i'm thinking it should but no idea maybe its the lack of sleep

  6. #6
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,003

    Re: Pulling Data from List if cell blank then move to next

    I using the previous sample to rewrite the formula.
    The sample formula is as attached.
    Attached Files Attached Files

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Pulling Data from List if cell blank then move to next

    if you have a list like that
    number the list in a spare column 1 down to end
    then select whole sheet then sort list all the blanks will go to bottom
    delete blank rows
    then sort again by the numbered column you created to put them all back in the right order with no blanks

  8. #8
    Registered User
    Join Date
    04-16-2009
    Location
    Nottingham
    MS-Off Ver
    Excel 2000
    Posts
    7

    Re: Pulling Data from List if cell blank then move to next

    another problem with that martin is that the blanks could have been filled in...it depends on how the form has been filled out and how many is needed and such.....

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Pulling Data from List if cell blank then move to next

    if the blanks have been filled in how are they blanks?

  10. #10
    Registered User
    Join Date
    04-16-2009
    Location
    Nottingham
    MS-Off Ver
    Excel 2000
    Posts
    7

    Re: Pulling Data from List if cell blank then move to next

    Right say

    if on the 02/04/09 that the above list was correct this time

    but on the 04/04/09 only 19 cells had a value thats means having to do that each time you have put in new data.....you see what i mean? This will be all part of a larger form just trying to automate it as much as i can just to make it efficient as possible

    Sorry if i'm not explaning my self very well

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Pulling Data from List if cell blank then move to next

    windknife's works you could use that , i was trying to avoid arrays as they are not that obvious as to how they work, are difficult to remember.for newer users.
    the one i posted will work so will the other. its just a question of how do you get 6 sheets ino one really and as they are changing in size that could be a bit awkward
    it could probably be easily done with some vba code, finding the used range on each sheet and sending to a master without blanks.

  12. #12
    Registered User
    Join Date
    04-16-2009
    Location
    Nottingham
    MS-Off Ver
    Excel 2000
    Posts
    7

    Re: Pulling Data from List if cell blank then move to next

    I'll have a play with them today and see how it fairs and will post how it goes hopefully it'll go well

    Not really new to excel just new to using excel this in depth if you know what I mean

  13. #13
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,003

    Re: Pulling Data from List if cell blank then move to next

    See attached. Data is in Sheet3, Sheet4 and Sheet5!
    Column A is sample method to join the data of Sheet3, Sheet4 and Sheet5.
    Column B is final answer.

    If this sample is not you want, I think you maybe need a Macro.

    HTH,
    WindKnife
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    04-16-2009
    Location
    Nottingham
    MS-Off Ver
    Excel 2000
    Posts
    7

    Re: Pulling Data from List if cell blank then move to next

    Thats exactly what i want

    Cheers

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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