to return data from two cells in excel

I have two cells in excel with text in one and the other is blank, i want to say if h2 cell is blank return K2 cell text and other way round too
tinatomsAsked:
Who is Participating?
 
Jorge PaulinoConnect With a Mentor IT Pro/DeveloperCommented:
If I understood you could do that using a formula:

=IF(J1<>"";J1;H1)

It checks if the value in J1 is not empty and it shows the J1 or the H1. You could repeate that for several rows.
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
Can you explain it better?
0
 
Michael FowlerSolutions ConsultantCommented:
This formula should give you what you are after
=IF(AND(ISBLANK(H2),ISBLANK(K2)),"",IF(ISBLANK(H2),K2,H2))

Open in new window


Michael
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
tinatomsAuthor Commented:
ok lets use A & B Cells

I have Australia in A and B is Blank so in Cell C i want it to show Austrailia

But if there is text in A & B i want to only return B text
0
 
tinatomsAuthor Commented:
thanks Michael, but where cell H is blank and J has something it leaves it blank still
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
But you want to fill the cell H if it's blank with the values of the cell J?
0
 
tinatomsAuthor Commented:
no ok right i have might have text in H or J  then in other cell i want to return either whats in J or if blank whats in H
0
 
tinatomsAuthor Commented:
Jpaulino it doesnt like that think its the ""
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
Check the example
Book1.xlsx
0
 
Michael FowlerSolutions ConsultantCommented:
tinatoms

My formula looks at cells H2 and K2 as per the original question. It also allows for both cells to be empty

Michael
0
 
tinatomsAuthor Commented:
Jpaulino many thanks all working now
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.