Transpose row to column and ignore blank in Excel and Google Sheets

{=TRANSPOSE(FILTER(A2:A6, A2:A6<>""))} // ignore blanks

{=TRANSPOSE(A2:A3)} // doesn't ignore blanks

A2 = data cell

ArrayFormula use "Ctrl+Shift+Enter" for both formulas

Check below for a detailed explanation with pictures and how to use formulas in Excel and Google Sheets.