Reputation: 29
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
Google Sheetlink - https://docs.google.com/spreadsheets/d/19M0DlaRY_JgcgyyG2GpGhuEpdqMiDX-y2YoTA0TIakQ/edit?usp=sharing
I have tried
=ARRAYFORMULA(IF(A2="",A2,B2))
The results are incorrect
Upvotes: 0
Views: 44
Reputation: 1
try:
=INDEX(IF(A2:A10="", IF(B2:B10="", "Nil", B2:B10), A2:A10))
advantage: it's simple
Upvotes: 1
Reputation: 50751
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.
Upvotes: 1