How to Skip to Next Cell If a Cell Is Blank in Excel (5 Easy Ways)

Consider the following dataset containing a list of Ids, Products, and their corresponding Sales values. In the Product ID column and Product column, we have some blank cells. Using some formulas, we will skip these blank cells and retrieve values from the adjacent cells.

excel if blank then skip to next cell

We used the Microsoft Excel 365 version in this article, but you can use any other version at your disposal.


Method 1 – Using IF Function

Let’s use the IF function to make a list of products which don’t have corresponding Product IDs. When there is no value in a cell in the Product ID column, we’ll move to the adjacent cell and extract the value into the List column.

using IF function to Skip to Next Cell If a Cell Is Blank in Excel

Steps:

  • Enter the following formula in cell E4:
=IF(B4="",C4,"")

Here, B4 is the Product ID, and C4 is the corresponding Product name. If cell B4 is blank, the formula returns the product name Apple, otherwise a blank.

  • Press ENTER and drag down the Fill Handle to return the values for the rest of the column.

The following results are returned in the List column.

result due to Skip to Next Cell If a Cell Is Blank in Excel

Read More: How to Skip Blank Rows Using Formula in Excel


Method 2 – Using IF and ISBLANK Functions

Here, we will extract the names of the products which don’t have corresponding Product IDs into the List column using a combination of the IF and ISBLANK functions.

Using IF and ISBLANK functions to Skip to Next Cell If a Cell Is Blank in Excel

Steps:

  • Enter the following formula in cell E4:
=IF(ISBLANK(B4),C4,"")

Here, B4 is the Product ID, and C4 is the corresponding Product name. If cell B4 is blank, then the formula returns the product name Apple, otherwise a blank.

  • Press ENTER and drag down the Fill Handle.

A list of names of products without ids is returned.

final list due to Skip to Next Cell If a Cell Is Blank in Excel

Read More: How to Skip a Column When Selecting in Excel


Method 3 – Using the IFS Function

Here, we will skip the blank cells in the Product ID column and move to the adjacent cell in the Product column to extract the name of the products, then gather them in the List column using the IF, ISNA, and IFS functions.

Implementing IFS function to Skip to Next Cell If a Cell Is Blank in Excel

Steps:

  • Enter the following formula in cell E4:
=IF(ISNA(IFS(B4="",C4,C4="","")),"",IFS(B4="",C4,C4="",""))

Here, B4 is the Product ID, and C4 is the corresponding Product name.

Formula Breakdown

  • B4=””→ becomes
    • 123001=”” → if the value 123001 equates with a space, then it will return TRUE otherwise FALSE.
      • Output → FALSE
  • C4=””→ becomes
    • Apple=”” → if the value Apple equates with a space, then it will return TRUE otherwise FALSE.
      • Output → FALSE
  • IFS(B4=””,C4,C4=””,””) → becomes
    • IFS(FALSE, “Apple” ,FALSE,””) → returns a #N/A error because of the FALSE argument.
      • Output → #N/A
  • ISNA(IFS(B4=””,C4,C4=””,””)) → becomes
    • ISNA(#N/A) → TRUE
  • IF(ISNA(IFS(B4=””,C4,C4=””,””)),””,IFS(B4=””,C4,C4=””,””)) → becomes
    • IF(TRUE,””,#N/A) → returns blank.
      • Output → Blank

combined formula to Skip to Next Cell If a Cell Is Blank in Excel

  • Press ENTER and drag down the Fill Handle.

A list of products without Product Ids is returned in the List column.


Method 4 – Using a Combination of IFERROR, VLOOKUP and IF Functions

Here, we will search for the sales values in the Sales column, and then using the IFERROR, VLOOKUP and IF functions, we will skip the blank cells of the Product column and move to the Sales column to extract the corresponding sales values.

Using a Combination of IFERROR, VLOOKUP, IF Functions

We will extract the values from the Sales column into the following datasheet in a new sheet.

new sheet

Steps:

  • Enter the following formula in cell C4:
=IFERROR(IF(VLOOKUP(B4,Data!$B$3:$D$11,2,FALSE)&""="",IF(VLOOKUP(B4,Data!$B$3:$D$11,3,FALSE)&""="","",VLOOKUP(B4,Data!$B$3:$D$11,3,FALSE)),""),"")

Here, B4 is the Product ID.

Formula Breakdown

  • VLOOKUP(B4,Data!$B$3:$D$11,2,FALSE) → becomes
    • VLOOKUP(123001, Data!$B$3:$D$11,2, FALSE) → VLOOKUP will look for the value 123001 in the $B$3:$D$11 range of the Data sheet, the column index number is 2, and FALSE is for an exact match.
      • Output → Apple
  • VLOOKUP(B4,Data!$B$3:$D$11,2,FALSE)&””=”” → becomes
    • Apple&””=”” → “Apple”=”” → FALSE
  • IF(VLOOKUP(B4,Data!$B$3:$D$11,2,FALSE)&””=””,IF(VLOOKUP(B4,Data!$B$3:$D$11,3,FALSE)&””=””,””,VLOOKUP(B4,Data!$B$3:$D$11,3,FALSE)),””) → becomes
    • IF(FALSE,IF(VLOOKUP(B4,Data!$B$3:$D$11,3,FALSE)&””=””,””,VLOOKUP(B4,Data!$B$3:$D$11,3,FALSE)),””) → returns a Blank due to the FALSE argument.
      • Output → “”
  • IFERROR(IF(VLOOKUP(B4,Data!$B$3:$D$11,2,FALSE)&””=””,IF(VLOOKUP(B4,Data!$B$3:$D$11,3,FALSE)&””=””,””,VLOOKUP(B4,Data!$B$3:$D$11,3,FALSE)),””),””) → becomes
    • IFERROR(“”,””) → returns a blank.
      • Output → Blank

  • Press ENTER and drag down the Fill Handle.

The sales values for the blank products are returned in the Sales column of the new sheet.

final result to Skip to Next Cell If a Cell Is Blank in Excel

Read More: Skip to Next Result with VLOOKUP If Blank Cell Is Present


Method 5 – Using the IF and XLOOKUP Functions

Now we’ll apply the combination of the IF and XLOOKUP functions to return the name of the product just above a blank cell in the Product column in the List column. Then we will filter these values using the FILTER function.

Applying IF and XLOOKUP Functions

Steps:

  • Keep the initial cell of the List column Blank.

blank initial cell

  • Enter the following formula in cell D5:

=IF(B5=””,IF(B5=””,XLOOKUP(“*”,$B$4:B5,$B$4:B5,””,2,-1),””),IF(B5<>””,””,IF(D4=””,””,B5)))

Formula Breakdown

  • B5=”” → becomes
    • “Orange”=”” → if the text Orange equates with a space, then it will return TRUE otherwise FALSE.
      • Output → FALSE
  • IF(B5=””,XLOOKUP(“*”,$B$4:B5,$B$4:B5,””,2,-1) → becomes
    • IF(FALSE,XLOOKUP(“*”,$B$4:B5,$B$4:B5,””,2,-1)
      • Output → #N/A
  • B5<>”” → becomes
    • “Orange”<>”” → if the text Orange equates with a space, then it will return TRUE otherwise FALSE.
      • Output → TRUE
  • IF(D4=””,””,B5))) → becomes
    • IF(TRUE,””,B5)))
        • Output → “”
  • IF(B5=””,IF(B5=””,XLOOKUP(“*”,$B$4:B5,$B$4:B5,””,2,-1),””),IF(B5<>””,””,IF(D4=””,””,B5))) → becomes
    • IF(FALSE, #N/A,””)
          • Output → Blank

  • Press ENTER and drag down the Fill Handle.

The result is as follows:

In cell E4, use the following formula to remove the blanks from the List column:

=FILTER(D4:D11,D4:D11<>"")

Here, D4:D11 is the range in which we will be filtering out the blanks.

filtering to Skip to Next Cell If a Cell Is Blank in Excel

Read More: How to Skip Columns in Excel Formula


Download Practice Workbook


Related Articles


<< Go Back to Excel Cells | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjima Hossain
Tanjima Hossain

TANJIMA HOSSAIN is a marine engineer who enjoys working with Excel and VBA programming. For her, programming is a handy, time-saving tool for managing data, files, and online tasks. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. She holds a B.Sc. in Naval Architecture & Marine Engineering from BUET and is now a content developer. In this role, she creates tech-focused content centred around Excel and VBA. Apart from... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo