=if statement

bluegold

Active Member
Joined
Jun 21, 2009
Messages
279
How do I add an IF statement to the following formula's so that if Column N, O & P have no information entered in Column Q, it returns "nd" (No Data).


<table style="background-color: rgb(255, 255, 255); padding-left: 2pt; padding-right: 2pt; font-family: Arial,Arial; font-size: 10pt;" border="1" cellpadding="0" cellspacing="0"> <tbody> <tr style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt; font-weight: bold;"> <td>
</td> <td>N</td> <td>O</td> <td>P</td> <td>Q</td> <td>R</td></tr> <tr style="height: 15px;"> <td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">528</td> <td style="color: rgb(128, 0, 0); font-size: 9pt;">
</td> <td style="text-align: left; color: rgb(0, 128, 0); font-size: 9pt;">$1.80</td> <td style="text-align: left; font-size: 9pt;">won</td> <td style="text-align: left; font-size: 9pt;">113</td> <td style="text-align: left; font-size: 9pt;">103</td></tr> <tr style="height: 15px;"> <td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">529</td> <td style="text-align: left; color: rgb(128, 0, 0); font-size: 9pt;">$2.15</td> <td style="color: rgb(0, 128, 0); font-size: 9pt;">
</td> <td style="text-align: left; font-size: 9pt;">loss</td> <td style="text-align: left; font-size: 9pt;">112</td> <td style="text-align: left; font-size: 9pt;">122</td></tr> <tr style="height: 15px;"> <td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">530</td> <td style="text-align: left; color: rgb(128, 0, 0); font-size: 9pt;">$1.00</td> <td style="text-align: left; color: rgb(0, 128, 0); font-size: 9pt;">$1.00</td> <td style="text-align: left; font-size: 9pt;">draw</td> <td style="font-size: 9pt;">
</td> <td style="font-size: 9pt;">
</td></tr> <tr style="height: 15px;"> <td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">531</td> <td style="text-align: left; color: rgb(128, 0, 0); font-size: 9pt;">$1.00</td> <td style="text-align: left; color: rgb(0, 128, 0); font-size: 9pt;">$1.00</td> <td style="text-align: left; font-size: 9pt;">draw</td> <td style="font-size: 9pt;">
</td> <td style="font-size: 9pt;">
</td></tr></tbody></table>
<table style="border-style: groove; border-color: rgb(0, 255, 0); background-color: rgb(255, 252, 249); font-family: Arial; color: rgb(0, 0, 0); font-size: 10pt;"> <tbody> <tr> <td>Spreadsheet Formulas</td></tr> <tr> <td> <table style="font-family: Arial; font-size: 9pt;" border="1" cellpadding="2" cellspacing="0"> <tbody> <tr style="background-color: rgb(202, 202, 202); font-size: 10pt;"> <td>Cell</td> <td>Formula</td></tr> <tr> <td>N528</td> <td>=IF(P528=-1,F528 * 1, IF(P528=0,Z528+1,""))</td></tr> <tr> <td>O528</td> <td>=IF(P528=1,E528 * 1, IF(P528=0,Z528+1,""))</td></tr> <tr> <td>P528</td> <td>=SIGN(Q528-R528)</td></tr> <tr> <td>N529</td> <td>=IF(P529=-1,F529 * 1, IF(P529=0,Z529+1,""))</td></tr> <tr> <td>O529</td> <td>=IF(P529=1,E529 * 1, IF(P529=0,Z529+1,""))</td></tr> <tr> <td>P529</td> <td>=SIGN(Q529-R529)</td></tr> <tr> <td>N530</td> <td>=IF(P530=-1,F530 * 1, IF(P530=0,Z530+1,""))</td></tr> <tr> <td>O530</td> <td>=IF(P530=1,E530 * 1, IF(P530=0,Z530+1,""))</td></tr> <tr> <td>P530</td> <td>=SIGN(Q530-R530)</td></tr> <tr> <td>N531</td> <td>=IF(P531=-1,F531 * 1, IF(P531=0,Z531+1,""))</td></tr> <tr> <td>O531</td> <td>=IF(P531=1,E531 * 1, IF(P531=0,Z531+1,""))</td></tr> <tr> <td>P531</td> <td>=SIGN(Q531-R531)</td></tr></tbody></table></td></tr></tbody></table>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Into which column should the requested formula be entered?
Do you want to test for any blank cells in Columns N, O and P?
 
Upvote 0
Not completely sure I got the facts, but how about...
Excel Workbook
NOPQRS
1$1.80won113103nd
2$2.15loss112122nd
3$1.00$1.00draw
4$1.00$1.00draw
Sheet1
Excel 2007
Cell Formulas
RangeFormula
S1=IF(OR(N1="",O1="",P1=""),"nd","")
 
Upvote 0
Maybe this is what you want/need (?*(&%^%)

In Cell N528:

=IF(P528=-1,F528 * 1, IF(P528=0,Z528+1,""),IF(Q528="","nd")))
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top