Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

If else statement in excel

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
WalterRR
Asked:
WalterRR
  • 2
1 Solution
 
nutschCommented:
Like this?

=max(.49,min(h2*.01,2))
0
 
WalterRRAuthor Commented:
perfect , thanks
0
 
WalterRRAuthor Commented:
very prompt, concise answer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now