+ Reply to Thread
Results 1 to 14 of 14

Lookup and Populate

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    12

    Lookup and Populate

    Hi All,

    I am still new to this and trygin to learn as much as possible so I was hoping that someone might be able to help me with another query.

    I have a list of 'TRUE' 'FALSE' or blanks in column E, and 4 character data in column B. I would like to copy exactly, any data from column B that corresponds to 'FALSE' in column E into column F.

    I think I need to do something similar to below but I am not sure how to write it. I would be really grateful for any feedback :-)

    =VLOOKUP(FALSE, E2:E1000, INDEX, Column B, 0)

    Once I have the copied data in column F, I then need to get rid of any gaps so that it will no longer correspond to column B.

    Thank you :-)

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: Lookup and Populate

    Are the Trues and Falses the result of a formula calculation or text?

    A sample spreadsheet attached would help
    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
    Registered User
    Join Date
    02-11-2014
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Lookup and Populate

    Hi Alansidman,

    Yes, the TRUES and FALSES are from: = IF(D2=TRUE, "", IF( LEFT(B2, 1) = LEFT(C2, 1), TRUE, FALSE))

    Example1.xlsx

    Please see example above.

    Thank you

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: Lookup and Populate

    This will populate column F


    =IF(E1=FALSE,B1,"")

    but I don't understand this statement:

    Once I have the copied data in column F, I then need to get rid of any gaps so that it will no longer correspond to column B.

  5. #5
    Registered User
    Join Date
    02-11-2014
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Lookup and Populate

    Thank you - that's great. I mean that I would like to get rid of all the blank cells in the column - I thought I could do it by F5 - blanks - but this does not seem to work.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: Lookup and Populate

    I am still a bit confused. You want to get rid of blank cells or the rows that contain blank cells. If the latter, then rows based upon blanks in which column. Your explanation is not quite clear enough.

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Lookup and Populate

    Maybe this?

    In F1

    Array formula must be confirmed with Ctrl+Shift+Enter key combination

    =IFERROR(INDEX($B$1:$B$7,SMALL(IF($E$1:$E$7=FALSE,ROW($E$1:$E$7),""),ROWS($A$1:A1))),"")

    A
    B
    C
    D
    E
    F
    1
    1
    J876
    J876
    TRUE
    B543
    2
    1
    GG55
    GG55
    TRUE
    3
    1
    BL13
    BL13
    TRUE
    4
    1
    GT35
    GT35
    TRUE
    5
    1
    IF56
    IF56
    TRUE
    6
    1
    B543
    U764
    FALSE
    FALSE
    7
    1
    6897
    6879
    FALSE
    TRUE
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  8. #8
    Registered User
    Join Date
    02-11-2014
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Lookup and Populate

    Sorry I am not explaining well. My column F now reads: F1: blank, F2: blank, F3: blank, F4: blank, F5: blank, F6: B543, F7: blank etc.... (I have alot more data than on the example). I would like to get rid of the 'blanks' so that it reads: F1: B543, etc.

    I hope this helps.

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: Lookup and Populate

    I think that Alkey now has you covered on that.

  10. #10
    Registered User
    Join Date
    02-11-2014
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Lookup and Populate

    Hi AlKey,

    Thank you for the input I have tried this but it does not seem to work. Also, I am afraid I don't really understand what the formula means - sorry I am new to this!

  11. #11
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Lookup and Populate

    Follow these instructions

    1. Copy this formula and paste it cell F1 and press Enter.
    2. Press key F2 on your keyboard
    3. Press and hold Ctrl and Shift together and while holding them press Enter key.
    4. Drag formula down.

  12. #12
    Registered User
    Join Date
    02-11-2014
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Lookup and Populate

    Got it that's great - thank you. Would you mind explaining the formula so that I know what its doing and hopefully can repeat in future? :-)

  13. #13
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Lookup and Populate

    Basically, the formula looks in column E for 'FALSE' and returns the row number. Then it matches it with INDEX of column B and returns its value.


    You're welcome. Don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

  14. #14
    Registered User
    Join Date
    02-11-2014
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Lookup and Populate

    Thank you :-) Will do

+ 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] Lookup list, populate cells
    By x65140 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-05-2013, 05:20 PM
  2. Help with lookup and to populate a form
    By nojretlas in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-30-2013, 02:10 PM
  3. VLookup or any other lookup to populate data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2013, 12:36 PM
  4. Use lookup to populate drop down
    By Bytsy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-05-2012, 07:03 AM
  5. Lookup and populate 1 xlsx to another
    By nono5551212 in forum Excel General
    Replies: 0
    Last Post: 03-22-2010, 11:10 AM

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