Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


if statement

Posted on 2011-02-17
Medium Priority
Last Modified: 2012-06-27
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))
Question by:pdvsa
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 50

Expert Comment

by:barry houdini
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

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...
LVL 50

Accepted Solution

barry houdini earned 2000 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

Author Closing Comment

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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question