• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Excel Issue

JOE!

Smash Hero
Joined
Oct 5, 2008
Messages
8,075
Location
Dedham, MA
Hello computer support peoples, I have a bit of a conundrum:

I am trying to make a logical formula to make it so a value cannot go below 0, but also not above X (where X is the max value of a separate cell). However, I can only seem to make it work one way (not below 0, or not above X). Why is this?

I am using Excel 2007.
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
=IF(AND(CELLADDRESS<0,CELLADDRESS>X),"DOTHIS","DOTHAT")

etcetc
 

JOE!

Smash Hero
Joined
Oct 5, 2008
Messages
8,075
Location
Dedham, MA
Hrm, perhaps what I'm trying to do isn't possible with excel <.<

The CELLADDRESS refers to a formula:

=MAX(0,(I6-((B6-E6)*(100%-F6))))

This is for my Marvel-based game, I am making a formula for testing the "defensive" power sets like Invulnerability and the like vs various types of damage. The formula runs the damage dealt through the defensive measures set by (Invulnerability) and ends up with the actual damage dealt, as well as the character's current HP (in another cell). This particular formula has to do with one of the powers that grants temporary HP, and currently the max amount one can have is 35. Said formula shows how much "absorption" remains after the damage is dealt to it, which is why it cannot go below 0, or above 35 (the max amount).

Using what you gave me unfortunately doesn't show values between the numbers with the true/false statements :urg:
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
Sorry I didn't understand your request. This is very feasible in excel. Just use embedded if statements:

=IF(CELLADDRESS>=BLAHBLAH,BLAHBLAH,IF(CELLADDRESS<0,0,CELLADDRESS))
 
Top Bottom