Check multiple cells in excel move to next cell if null and if value found stop and return that value

0 votes

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.

Description explained above

Mar 24, 2023 in Others by narikkadan
• 63,600 points
544 views

1 answer to this question.

0 votes

Use this formula:

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

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

enter image description here

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 Kithuzzz
• 38,000 points

Related Questions In Others

0 votes
1 answer

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

answered Jan 8, 2023 in Others by narikkadan
• 63,600 points
2,527 views
0 votes
1 answer

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

answered Oct 24, 2022 in Others by narikkadan
• 63,600 points
782 views
0 votes
1 answer

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

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

answered Feb 24, 2023 in Others by narikkadan
• 63,600 points
1,390 views
0 votes
1 answer

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

answered Oct 10, 2022 in Others by narikkadan
• 63,600 points
1,208 views
0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

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

Feb 17, 2022 in Others by Edureka
• 13,690 points
975 views
0 votes
1 answer

Remove formulas from all worksheets in Excel using VBA

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

answered Oct 3, 2022 in Others by narikkadan
• 63,600 points
2,019 views
0 votes
1 answer

Calculate monthly average from daily data without PivotTable

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

answered Oct 3, 2022 in Others by narikkadan
• 63,600 points
1,761 views
0 votes
1 answer

Automate compound annual growth rate (CAGR) calculation

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

answered Oct 7, 2022 in Others by narikkadan
• 63,600 points
1,280 views
0 votes
1 answer

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

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

answered Feb 11, 2023 in Others by Kithuzzz
• 38,000 points
1,093 views
0 votes
1 answer

Excel - count if multiple words are in a cell

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

answered Feb 20, 2023 in Others by Kithuzzz
• 38,000 points
501 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP