SOLVED

Insert the numerical content of a cell in text that is part of an IF formula

Occasional Contributor

Insert the numerical content of a cell in text that is part of an IF formula

Hello:

I hope you guys can help me with a formula. I am a newbie so please be kind. Here goes...

I need to insert the numerical content of several different cells into text that is the "value_if_true" part of an IF formula. This data will be merged with a Word document.  This is my formula so far...

=if(D1="Applicable", "and
restricted common shares of Company Ltd. (as traded on the New York Stock Exchange under the symbol CPY, the “Company Stock”), calculated by dividing \$ by the Volume Weighted Average Price of the Company Stock, payable at closing.", "")

Here is what I am trying to accomplish:

=if(D1="Applicable", "and
=(C2) restricted common shares of Company Ltd. (as traded on the New York Stock Exchange under the symbol CPY, the “Company Stock”), calculated by dividing \$=(P2) by the Volume Weighted Average Price of the Company Stock, payable at closing.", "")

Thanks in advance for any suggestions.

Liz

7 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution

Re: Insert the numerical content of a cell in text that is part of an IF formula

@Liz_VC You may try-

`=IF(D1="Applicable", "and " & C2 &" restricted common shares of Company Ltd. (as traded on the New York Stock Exchange under the symbol CPY, the “Company Stock”), calculated by dividing \$ " & P2 &" by the Volume Weighted Average Price of the Company Stock, payable at closing.", "")`

Re: Insert the numerical content of a cell in text that is part of an IF formula

Perfect!!!  Thank you so much!

Re: Insert the numerical content of a cell in text that is part of an IF formula

Welcome! If this help, then please consider mark this answer as best response (tick mark the answer). It means your problem is solved.

Re: Insert the numerical content of a cell in text that is part of an IF formula

Did I wait too long to tick mark the answer? I don't see the option.

Re: Insert the numerical content of a cell in text that is part of an IF formula

How can I make the number in \$ " & P2 &" retain its Accounting format?

Re: Insert the numerical content of a cell in text that is part of an IF formula

To use accounting format for the value of P2:

=IF(D1="Applicable", "and " & C2 &" restricted common shares of Company Ltd. (as traded on the New York Stock Exchange under the symbol CPY, the “Company Stock”), calculated by dividing " & TEXT(P2, "_-\$* #,##0.00_-;-\$* #,##0.00_-;_-\$* ""-""??_-;_-@_-") &" by the Volume Weighted Average Price of the Company Stock, payable at closing.", "")