Solved

# if statement

Posted on 2011-02-17
231 Views
Experts, if C39 = text then I would need the result to be "Does not Drop Down" and return the formula if otherwise.  I do not know how to write if C39 = some text or letters.
thank you
I get a #Value:
=IF(C39=" ","Does not Drop Down"),\$C\$40*\$B\$42+(\$B\$26*\$B\$40*(\$B\$43/365))+(\$C\$41*\$B\$45)+(\$B\$26*\$B\$41*(\$B\$46/365))+((\$B\$26*\$B\$49)*\$B\$51)+(\$B\$26*\$B\$49*(\$B\$52/365))+((\$B\$26*\$B\$50)*\$B\$54)+(\$B\$26*\$B\$50*(\$B\$55/365))
0
Question by:pdvsa
• 2
• 2

LVL 50

Expert Comment

ID: 34917693
You can use ISTEXT, i.e.

=IF(ISTEXT(C39),"Does not Drop Down",\$C\$40*\$B\$42+(\$B\$26*\$B\$40*(\$B\$43/365))+(\$C\$41*\$B\$45)+(\$B\$26*\$B\$41*(\$B\$46/365))+((\$B\$26*\$B\$49)*\$B\$51)+(\$B\$26*\$B\$49*(\$B\$52/365))+((\$B\$26*\$B\$50)*\$B\$54)+(\$B\$26*\$B\$50*(\$B\$55/365)))

regards, barry
0

Author Comment

ID: 34918204
OK that does work for a scenario I have but for the other one (wont go into detail) it does not work.  Can you modify to if it equals "Does not Drop Down" then return "Does not Drop Down" and Else the formula?

thank you barry...
0

LVL 50

Accepted Solution

barry houdini earned 500 total points
ID: 34918241
For that you can use this version

=IF(C39="Does not Drop Down",C39,\$C\$40*\$B\$42+(\$B\$26*\$B\$40*(\$B\$43/365))+(\$C\$41*\$B\$45)+(\$B\$26*\$B\$41*(\$B\$46/365))+((\$B\$26*\$B\$49)*\$B\$51)+(\$B\$26*\$B\$49*(\$B\$52/365))+((\$B\$26*\$B\$50)*\$B\$54)+(\$B\$26*\$B\$50*(\$B\$55/365)))

If you explain the scenario where the first formula didn't work, I'm sure there would be a way to address that too

regards, barry
0

Author Closing Comment

ID: 34918411
that was it!  thank you barry...
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaacâ€¦