In the below excel table, I am looking for a formula/vba code will the following Problem Statement:

• If cell A2 is empty, go to cell B2, if cell C2 is empty go to cell D2. and if value is present in cell D2 return its value in results cell E2.

Mar 24, 2023 in Others 293 views

## 1 answer to this question.

Use this formula:

`=INDEX(FILTER(A2:D2,A2:D2<>""),1,1)`

INDEX returns the first value of the FILTERed (=all non-empty cells) result

To select non-adjacent cells you can use this formula

```=LET(data,CHOOSECOLS(A1:F1,1,3,5,6),
@FILTER(data,data<>""))```
answered Mar 24, 2023 by
• 38,010 points

## How to unmerge multiple cells and transpose each value into a new column in Pandas dataframe from excel file

Try this: df = pd.read_excel("Sample_File.xlsx", header=[0,1,2,3,4,5], index_col = ...READ MORE

## How can I use a command button in excel to set the value of multiple cells in one click?

Try this: Private Scan As Integer Private Sub CommandButton1_Click() ...READ MORE

## Highlight cells in an Excel column if the value can be found in an array

Try this: =COUNTIFS(B:E,\$A1) READ MORE

## Excel formula for searching two text in one cell and return values based on the result

You can include a second IF within ...READ MORE

## Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

## Remove formulas from all worksheets in Excel using VBA

Try this : Option Explicit Sub test1() ...READ MORE

## Calculate monthly average from daily data without PivotTable

Assuming you have the months in column D enter ...READ MORE

## Automate compound annual growth rate (CAGR) calculation

The following PowerPivot DAX formulas worked for ...READ MORE