+ Reply to Thread
Results 1 to 4 of 4

get data from multiple cells where shading doesn't exist and make one list from many

  1. #1
    Registered User
    Join Date
    10-01-2020
    Location
    London, England
    MS-Off Ver
    365
    Posts
    78

    Question get data from multiple cells where shading doesn't exist and make one list from many

    Hi experts,

    I have a need to get information from multiple lists. These are simply lists of a description and a quantity. They are all on the same tab, and the format is fixed, so it won't change size or content, except for the shading and quantities.

    I need to get, automatically, a simplified list of only the descriptions and quantities from the cells that aren't shaded and ignore the ones that are shaded.

    To make it more 'fun' the lists are laid out next to each other, beneath and not of equal length, as in the demo file attached.

    Hope this explains what is required here.

    Thanks.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: get data from multiple cells where shading doesn't exist and make one list from many

    At first I was going to say that you can't use a formula to detect shading, but when I saw your data I realised that those shaded cells are all empty. You could do it using a few helper columns where these are not used, so put this formula in C3:

    =IF(AND(ISNUMBER(B3),A3<>""),MAX(C$2:C2)+1,"-")

    and copy this down to C18. It will identify the records which you want to transfer and allocate a unique number to each. The formulae from C3:C18 can be copied into F3 and then I3, but in order to make the numbers run from one column to the next, you need this formula in F2:

    =MAX(C:C)

    which can be copied into I2.

    Then you can use this formula in A22:

    =IF(ROWS($1:1)>MAX($I:$I),"",IFERROR(INDEX(A:A,MATCH(ROWS($1:1),$C:$C,0)),IFERROR(INDEX(D:D,MATCH(ROWS($1:1),$F:$F,0)),INDEX(G:G,MATCH(ROWS($1:1),$I:$I,0)))))

    Copy it into B22, and then copy both formulae down until you start to get blanks.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    10-01-2020
    Location
    London, England
    MS-Off Ver
    365
    Posts
    78

    Re: get data from multiple cells where shading doesn't exist and make one list from many

    Hi Pete,

    I don't even know how that works, but it does!
    Thanks for that, pretty nifty.

    Neilos

    Edit. I can't add rep! pete_uk.png
    Last edited by neilosj; 02-19-2021 at 10:31 AM. Reason: additional

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: get data from multiple cells where shading doesn't exist and make one list from many

    Glad to help. If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Regarding the rep, don't worry about it. The message means that you can't give consecutive rep to the same person - you need to "spread it around". You must have given rep to me the last time you did so.

    Pete

+ 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] If worksheet name doesn't exist from list then create using template
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-18-2017, 02:37 PM
  2. Create folder in list if it doesn't exist
    By ChrysanthiM in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-22-2016, 12:04 PM
  3. How to delete a worksheet if it doesn't exist in a list
    By iamrickdeans in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2013, 09:46 AM
  4. userform to search exist data customer item list for make bill
    By shaik.ibrahim in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2011, 04:37 AM
  5. Combining 2 cells numbers unless one doesn't exist
    By desk.doc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-11-2007, 03:24 PM
  6. [SOLVED] VBA: Make a new sheet if it doesn't exist
    By PaulW in forum Excel General
    Replies: 2
    Last Post: 05-08-2006, 10:50 AM
  7. [SOLVED] VBA, Make a new sheet if it doesn't exist
    By PaulW in forum Excel General
    Replies: 1
    Last Post: 05-05-2006, 12:30 PM

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