Hello all.
I want to make an if/then statement that works with words and with numbers.
For example:
if b = coupon rate[number], then, bond sells at par value[words]
if b > coupon rate[number], then, bond sells at discount[words]
if b < coupon rate[number], then, bond sells at premium[words]
I have searched for a while and have yet to find how to perform such functions.
Help if you can.
Thanks,
-avd
[Solved] If/then statements with word and number values
[Solved] If/then statements with word and number values
Last edited by Hagar Delest on Tue Aug 02, 2011 10:51 pm, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
OpenOffice 3.2
Ubuntu 10.04 lucid
Ubuntu 10.04 lucid
Re: Calc: if/then statements with word and number values
The basic form of the statement is (assuming the value of b is stored in cell B1 and the coupon rate is stored in C1)
I added the "other than par value" part because the structure of the IF() statement is usually IF(This Is True; Do This; Otherwise Do This)
Your three conditions can be done in a single formula
The three IF() are nested so each successive IF() serves as the "Otherwise Do This" clause of the previous IF()
Code: Select all
IF(B1 = C1;"The bond sells at par value";"The bond sells at a price other than par value")
Your three conditions can be done in a single formula
Code: Select all
IF(B1=C1;"The bond sells at par value";IF(B1>C1;"The bond sells at a discount";IF(B1<C1;"The bond sells at a premium")))
Edit: After sitting down to dinner I realized that there is no need for three nested IF's. If the first two are false, then the last condition has to be true. The formula can be
Code: Select all
|
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: If/then statements with word and number values
Thanks. I'll plug it in and see what happens.
OpenOffice 3.2
Ubuntu 10.04 lucid
Ubuntu 10.04 lucid
Re: If/then statements with word and number values
FJCC,
Thanks for the help. It worked perfectly.
-AVD
Thanks for the help. It worked perfectly.
-AVD
OpenOffice 3.2
Ubuntu 10.04 lucid
Ubuntu 10.04 lucid
Re: [Solved] If/then statements with word and number values
Language is very technical .I tried to understand it but i think i need to consult with someone who can understand verbally.