Solved

If else statement in excel

Posted on 2014-03-13
3
201 Views
Last Modified: 2014-03-13
I would like to write an excel formula that will get the percentage value of one column (one cell and then i drag it down...). It will set a cell to this value within a min and max range... for example, it will calculate 1% of column H, row 2, if the value is less than .49 set to .50, if the value is greater that 2.0 set to 2.0 otherwise the value is the percentage value

pseudo code:

             
  
                  if (H2*0.01)<0.49
                     value = 0.5
                  else if (H2*0.01)>2.0
                     value = 2.0
                  else 
                    value = (H2*0.01)

Open in new window

0
Comment
Question by:WalterRR
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 500 total points
ID: 39928112
Like this?

=max(.49,min(h2*.01,2))
0
 

Author Comment

by:WalterRR
ID: 39928125
perfect , thanks
0
 

Author Closing Comment

by:WalterRR
ID: 39928126
very prompt, concise answer
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
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.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now