If a cell contains text, insert that text within a sentence in another cell

%3CLINGO-SUB%20id%3D%22lingo-sub-2821922%22%20slang%3D%22en-US%22%3EIf%20a%20cell%20contains%20text%2C%20insert%20that%20text%20within%20a%20sentence%20in%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2821922%22%20slang%3D%22en-US%22%3E%3CP%3EAt%20the%20moment%2C%20I've%20got%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3DIF(%3C%2FSPAN%3E%3CSPAN%3EB27%3C%2FSPAN%3E%3CSPAN%3E%26lt%3B%26gt%3B%22%22%2C%22I%20want%20to%20show%20this%20sentence%20with%20(%22%3C%2FSPAN%3E%3CSPAN%3EB27%3C%2FSPAN%3E%3CSPAN%3E%22)%20in%20the%20middle%20of%20it.%22%2C%22%22)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EObviously%20the%20(%22B27%22)%20is%20wrong%20and%20here%20I%20want%20the%20actual%20text%20that's%20written%20in%20B27.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAny%20ideas%3F%20Thank%20you%20so%20much!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2821922%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20for%20web%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2822006%22%20slang%3D%22en-US%22%3ERe%3A%20If%20a%20cell%20contains%20text%2C%20insert%20that%20text%20within%20a%20sentence%20in%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2822006%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1023675%22%20target%3D%22_blank%22%3E%40Jodes1675%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELike%20this%3A%3C%2FP%3E%0A%3CP%3E%3DIF(B27%26lt%3B%26gt%3B%22%22%2C%22I%20want%20to%20show%20this%20sentence%20with%20(%22%20%26amp%3B%20B27%20%26amp%3B%20%22)%20in%20the%20middle%20of%20it.%22%2C%22%22)%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

At the moment, I've got:

 

=IF(B27<>"","I want to show this sentence with ("B27") in the middle of it.","")

 

Obviously the ("B27") is wrong and here I want the actual text that's written in B27.

 

Any ideas? Thank you so much!

1 Reply

@Jodes1675 

Like this:

=IF(B27<>"","I want to show this sentence with (" & B27 & ") in the middle of it.","")