Concatenate: Two cells from Sheet2 into One cell in Sheet1

S

sam

Hi All,

How can I concatenate two cells from Sheet2 and display in One cell in Sheet1?

Here is the formula I got so far.. But its not working

= IF(+Sheet2!B5=+Sheet2!B2,(Sheet2!B2 & "-" & Sheet2!D2),(Sheet2!B3 & " & "
& Sheet2!B4))

Thanks in advance
 
J

Jacob Skaria

Do you mean

=IF(Sheet2!B5=Sheet2!B2,Sheet2!B2 & "-" & Sheet2!D2,Sheet2!B3 & "-" &
Sheet2!B4)

If this post helps click Yes
 
S

Sam

thank you jacob, Is there a way of writing Elseif statement in excel sheet?

There are three conditions possible for this cell.

Eg: If Sheet2!A1 = Sheet2!B1 Then Sheet1!A1 = Sheet2!B1 & Sheet2!C1
ElseIf Sheet2!A1 = Sheet2!B2 Then Sheet1!A1 = Sheet2!B2 & Sheet2!C2
ElseIf Sheet2!A1 = "" Then Sheet1!A1 = ""

Thanks in advance
 
J

Jacob Skaria

No ELSE statement..But you have TRUR/FALSE .So your formula equates to

=IF(Sheet2!A1 = "","",IF(Sheet2!A1=Sheet2!B1,Sheet2!B1 &
Sheet2!C1,IF(Sheet2!A1=Sheet2!B2,Sheet2!B2 & Sheet2!C2,"")))

If this post helps click Yes
 
S

Sam

That worked out great! Thank you once again

Jacob Skaria said:
No ELSE statement..But you have TRUR/FALSE .So your formula equates to

=IF(Sheet2!A1 = "","",IF(Sheet2!A1=Sheet2!B1,Sheet2!B1 &
Sheet2!C1,IF(Sheet2!A1=Sheet2!B2,Sheet2!B2 & Sheet2!C2,"")))

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top