+ Reply to Thread
Results 1 to 6 of 6

Extend IF function until blank cell is found

  1. #1
    Registered User
    Join Date
    09-04-2012
    Location
    StL
    MS-Off Ver
    Office 2016
    Posts
    24

    Extend IF function until blank cell is found

    Hello all,
    I have a formula that is working as intended, but I would like the IF function to continue to look at the next cell in the column (B). If it is not blank, I want it to grab the cell's value and place a period after it, then move on to the next cell.

    So, the end of the formula shown below, I would like it to continue with:
    IF('TABLE&FIELDS'!B3<>"",'TABLE&FIELDS'!B3&".")
    IF('TABLE&FIELDS'!B4<>"",'TABLE&FIELDS'!B4&".")
    IF('TABLE&FIELDS'!B5<>"",'TABLE&FIELDS'!B5&".")

    all the way to the first blank cell in the column (which might be a few hundred cells).
    Any advice on how to extend the function out, without going cell by cell?
    Thanks, in advance!

    If Statement.png

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Extend IF function until blank cell is found

    If you're on Office 2016 then I think TEXTJOIN is your friend here so your formula would become:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Extend IF function until blank cell is found

    Quote Originally Posted by WideBoyDixon View Post
    If you're on Office 2016 then I think TEXTJOIN is your friend
    TEXTJOIN is available in 2019 forward (not 2016).
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Extend IF function until blank cell is found

    Quote Originally Posted by 6StringJazzer View Post
    TEXTJOIN is available in 2019 forward (not 2016).
    Oh nuts!! How about:

    Please Login or Register  to view this content.
    Enter as an array formula with Ctrl+Shift+Enter.

    WBD

  5. #5
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Extend IF function until blank cell is found

    Maybe

    Please Login or Register  to view this content.
    Follow with Ctrl-Shift-Enter for array formula.

    Regards.

  6. #6
    Registered User
    Join Date
    09-04-2012
    Location
    StL
    MS-Off Ver
    Office 2016
    Posts
    24

    Re: Extend IF function until blank cell is found

    Thanks for the responses! Actually, the TEXTJOIN did the trick on this one!
    Much appreciated, all!

+ 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. How can I extend values downwards until it reaches a non-blank cell and continue?
    By PistachioPedro in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-26-2018, 12:29 AM
  2. [SOLVED] Auto sum when next blank cell found
    By hudson andrew in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-08-2016, 02:43 PM
  3. SUM Column until blank cell is found
    By MrSmoofy in forum Excel General
    Replies: 5
    Last Post: 08-07-2015, 06:54 AM
  4. [SOLVED] Set cell to = 0 / blank if value is found in a column.
    By SalientAnimal in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-08-2014, 05:34 AM
  5. [SOLVED] Rather than Bring over 0 if cell is found blank - i would like to say Not Provided
    By HNoel33 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-18-2013, 03:33 AM
  6. [SOLVED] Return data if blank cell is found
    By Dartmouth_jock in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-09-2013, 03:03 PM
  7. [SOLVED] Insert row when blank cell is found
    By cadew in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-25-2012, 05:06 PM

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