Solved

If else statement in excel

Posted on 2014-03-13
3
206 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

828 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