Solved

If else statement in excel

Posted on 2014-03-13
3
213 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
[X]
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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

695 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