If then nested with isblank count blank?

kmprice710

Board Regular
Joined
Jan 8, 2014
Messages
87
Office Version
  1. 2019
Platform
  1. Windows
I have four columns of pricing data. If columns A, B, C are all blank, then I want to output whatever is in column D. If Columns A & B are blank but something is in C, then I want C. If Columns A & C are blank, but something is in B, then I want B. If Columns B & C are blank but something is in A, then I want A. There's never a case of something being in A & B, A & C or B & C at the same time.

I think I can write this with an IF/THEN using ISBLANK or COUNTBLANK, but how do I nest it?

5.66
3.24
6.7518.99
17.15
7.8222.25

<tbody>
</tbody>
 
Last edited:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Excel 2010
ABCDE
15.663.245.66
26.7518.996.75
317.1517.15
47.8222.257.82
Sheet1
Cell Formulas
RangeFormula
E1=IF(A1<>"",A1,IF(B1<>"",B1,IF(C1<>"",C1,D1)))
E2=IF(A2<>"",A2,IF(B2<>"",B2,IF(C2<>"",C2,D2)))
E3=IF(A3<>"",A3,IF(B3<>"",B3,IF(C3<>"",C3,D3)))
E4=IF(A4<>"",A4,IF(B4<>"",B4,IF(C4<>"",C4,D4)))
 
Upvote 0
=INDEX(A1:D1,MATCH(TRUE,A1:D1<>"",0))
Confirm with CTRL-SHIFT-ENTER rather than just Enter and copy down.


Excel 2010
ABCDEFG
15.663.245.66
26.7518.996.75
317.1517.15
47.8222.257.82
Sheet1
Cell Formulas
RangeFormula
G1{=INDEX(A1:D1,MATCH(TRUE,A1:D1<>"",0))}
G2{=INDEX(A2:D2,MATCH(TRUE,A2:D2<>"",0))}
G3{=INDEX(A3:D3,MATCH(TRUE,A3:D3<>"",0))}
G4{=INDEX(A4:D4,MATCH(TRUE,A4:D4<>"",0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top