+ Reply to Thread
Results 1 to 9 of 9

Pull information from Sheet if Cell is blank

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Pull information from Sheet if Cell is blank

    I've attached a little sample. What I need is to get a few data fields if the Voucher number is blank, or is less than 7 characters, unless the value is NA or N/A. I could do this easily with a pivot table, except that this is in a shared workbook, so pivot tables can't be updated without unsharing, and I need current information and don't want to unshare.

    So, what I'd like is a series of formulas that can bring in the requisite information. So far my brain is circling but without any hits. Any help would be appreciated.
    Attached Files Attached Files
    I know I'm not stupid, but I suspect I'm a lot stupider than I think I am

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Pull information from Sheet if Cell is blank

    Please try at
    A2
    =IF($B2="","",INDEX('Source Data'!A$3:A$25,$B2))

    B2
    =IFERROR(AGGREGATE(15,6,'Source Data'!$B$3:$B$25/(LEFT('Source Data'!$J$3:$J$25)<>"N")/(LEN('Source Data'!$J$3:$J$25)<7),ROWS(A$2:A2)),"")

    C2:F2
    =IF($B2="","",INDEX('Source Data'!$A$3:$L$25,$B2,MATCH(C$1,'Source Data'!$A$2:$L$2,)))

    Custom format E:F to # to hide Zero
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Pull information from Sheet if Cell is blank

    Bo_Ry, you're a wizard! So far it seems to be working perfectly, and I understand most of it, but would you care to explain what the formula in Column B is doing?

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Pull information from Sheet if Cell is blank

    Yes, from this

    number is blank, or is less than 7 characters
    it is the same criteria that len is less than 7

    A. (LEN('Source Data'!$J$3:$J$25)<7)

    unless the value is NA or N/A
    Check if not start with N

    B. (LEFT('Source Data'!$J$3:$J$25)<>"N")

    'Source Data'!$B$3:$B$25/(LEFT('Source Data'!$J$3:$J$25)<>"N")/(LEN('Source Data'!$J$3:$J$25)<7)

    Vendor ID/B./A.
    if A. and B. are true
    =Vendor ID/True/True =Vendor ID/1/1 =Vendor ID

    if A. or B. are false
    Vendor ID/True/False Vender ID/1/0 = #Div/0!
    filter out the ID that not match both criteria

    Aggregate( 15 small, 6 ignore error,
    Use for pull small ID

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Pull information from Sheet if Cell is blank

    Okay, I'm running into trouble. My vendor IDs, in actuality, are long values, and we have multiple payments to each vendor, so there are multiple lines with the same vendor name and vendor ID. Also, my current range extends down to line 1556, and will grow longer, so I need to be able to set my formula range down to about row 10000 to catch everything. I've attached an updated Sample workbook so you can see the issues. Thanks for your help so far.
    Attached Files Attached Files

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Pull information from Sheet if Cell is blank

    Please try
    A2
    =IFERROR(INDEX('Source Data'!A:A,AGGREGATE(15,6,ROW('Source Data'!$B$3:$B$99)/(LEFT('Source Data'!$J$3:$J$99)<>"N")/(LEN('Source Data'!$J$3:$J$99)<7),ROWS(A$2:A2)))&"","")

    B2:F2
    =IF($A2="","",INDEX('Source Data'!$A$3:$L$40,MATCH($A2,'Source Data'!$A$3:$A$40,),MATCH(B$1,'Source Data'!$A$2:$L$2,)))
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Pull information from Sheet if Cell is blank

    Okay, so we're not erroring anymore, but I'm getting some entries that DO have voucher numbers. In the WB you attached, if look at your formulas in rows 18-20 you see valid voucher numbers. However, that's for where they do have a valid voucher and amount, it's NOT the data where they're missing the voucher number.
    Last edited by jomili; 10-07-2019 at 12:30 PM.

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Pull information from Sheet if Cell is blank

    You have duplicate name and ID , match from column A won't work
    Try

    A2:F2
    =IFERROR(INDEX('Source Data'!$A:$L,AGGREGATE(15,6,ROW('Source Data'!$B$3:$B$99)/(LEFT('Source Data'!$J$3:$J$99)<>"N")/(LEN('Source Data'!$J$3:$J$99)<7),ROWS(A$2:A2)),MATCH(A$1,'Source Data'!$A$2:$L$2,)),"")

  9. #9
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Pull information from Sheet if Cell is blank

    Same conclusion I came to. I think that gets me where I need to be. Thanks so much for all your help!

+ 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. pull information from another sheet when input information
    By hquintana84 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-08-2015, 12:41 PM
  2. [SOLVED] Excel Formula to pull data from another sheet and place cell blank if value is 0
    By szpt9m in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 09-18-2013, 01:07 AM
  3. looking for marco to pull information from different sheet
    By zbyke in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2013, 02:33 AM
  4. Replies: 19
    Last Post: 05-13-2013, 01:08 PM
  5. Macro to Pull information from one Excel Sheet based on information in another sheet
    By IwannabanExcelGod in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2013, 02:11 PM
  6. [SOLVED] Pull out information from main sheet to summary sheet
    By abhineet.sabharwal in forum Excel General
    Replies: 3
    Last Post: 03-02-2013, 01:46 PM
  7. HOW CAN I PULL INFORMATION FROM ONE SHEET TO ANOTHER IF NOT #
    By K in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-08-2006, 09:20 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