Combine results from two columns

In column A

Circular
null
Linear
null

In column B

null
l
null
c

I want, in Column C, Circular or Linear depending on the non null results from column A or B e.g.

Column C

Circular
Linear
Linear
Circular

I thought this would work:-

=IF(ISTEXT(LEFT(A4,1)),A4,IF(B4="c","Circular",IF(B4="l","Linear","")))

this only picks up the Column A result i.e. it shows null in C 2 and 4

if replaced with:-

=IF(B4="c","Circular",IF(B4="l","Linear",""))

I get Circular in C2 and Linear in C4, but of course null in C1 and C3

Why does my combined forumla not work? What logic am I missing?

Any advice please?

You want this?

=IF(OR(LEFT(A1,1)="c",B1="c"),"Circular",IF(OR(LEFT(A1,1)="l",B1="l"),"Linear",""))

Thank you for the help

Hi, have a look at the attached, I have setup column G to be the lookup and column H as the result, and used =IF(A2>=CHAR(33),INDEX(H$1:H$4,MATCH(A2,G$1:G$4,0)),INDEX(H$1:H$4,MATCH(B2,G$1:G$4,0),0))
LOQ20220316.ods (15.8 KB)
to get the result in column C.
Let us know if it helps. Produced using Windows 10 home, LO 7.3.1.3

1 Like