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 253 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<>""))```
• 38,010 points

## 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

## 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

## Excel formula to get certain cell if the value is between 2 numbers

So, first with vlookup(): A formula so you ...READ MORE

## Excel - count if multiple words are in a cell

Try this using wildcards * with TEXTBEFORE()&nb ...READ MORE