To copy data from column A to column C
If Cell A empty, to take data from column B
If both cell empty mention Nil
I have tried
=ARRAYFORMULA(IF(A2="",A2,B2))
The results are incorrect
CodePudding user response:
Use MAP
to get each value, IFS
to check if empty and return appropriate values:
=MAP(A2:A15,B2:B15,LAMBDA(a,b,IFS(a<>"",a,b<>"",b,true,"Nil")))
Advantage: You only need to enter the range once.
CodePudding user response:
try:
=INDEX(IF(A2:A10="", IF(B2:B10="", "Nil", B2:B10), A2:A10))
advantage: it's simple