Help With Excel Formula

 
Thread Tools Search this Thread Display Modes
Old 07-13-2005, 02:03 PM   #1
Senior Life Manager
 
Christine's Avatar
 
Trade: Home Improvement
Join Date: Jun 2005
Location: Central New Jersey
Posts: 58

Help With Excel Formula


Hi, all. Can anyone tell me how to put the following phrase into a formula for Excel?

"If any cell in range A1 through D1 is equal to or greater than 4, return the value (not text) 45."

I can't find anything to tell me how to formulize the "any cell in range..." part.

Thanks in advance!

-Christine (AKA Hollis)

Christine is offline  
Warning: The topics covered on this site include activities in which there exists the potential for serious injury or death. ContractorTalk.com DOES NOT guarantee the accuracy or completeness of any information contained on this site. Always use proper safety precaution and reference reliable outside sources before attempting any construction or remodeling task!

Old 07-13-2005, 02:34 PM   #2
Custom Builder
 
Glasshousebltr's Avatar
 
Trade: From dirt to ridge vent
Join Date: Feb 2004
Location: South Central Illinois
Posts: 4,403
Send a message via AIM to Glasshousebltr Send a message via Yahoo to Glasshousebltr

Re: Help With Excel Formula


I think it's (a1..d1), or maybe that just works on adding.

Bob
__________________
Bob
Glasshousebltr is offline  
Old 07-13-2005, 02:51 PM   #3
Pro
 
PipeGuy's Avatar
 
Trade: underground
Join Date: Oct 2004
Location: Southeast USA
Posts: 3,228

Re: Help With Excel Formula


=if(sum(a85:d85)>=4,45,0)

to return a text message instead of the value 0

=if(sum(a85:d85)>=4,45,"message")

Last edited by PipeGuy; 07-13-2005 at 02:57 PM.
PipeGuy is offline  
Old 07-13-2005, 06:11 PM   #4
Repair/Remodeling Tech.
 
jproffer's Avatar
 
Trade: Repair and Remodeling Services
Join Date: Feb 2005
Location: Chester, IL
Posts: 736

Re: Help With Excel Formula


It depends on what exactly you mean...if a1 - d1 will be either 0 or 4..and nothing else...EVER, then pipe's way would work. What if a1=2, d1=2, c1=1, d1=0...none of them fit your criteria, but the sum is more than 4 so 45 would return.

=IF(OR(A1>=4,B1>=4,C1>=4,D1>=4),45,"")

That would work if you want to return 45 if ANY of the cells are equal to or more than 4.

=IF(AND(A1>=4,B1>=4,C1>=4,D1>=4),45,"")

That would do the job if you want to return 45 only when ALL of the 4 cells are 4 or more.
jproffer is offline  
Old 07-13-2005, 10:50 PM   #5
Pro
 
PipeGuy's Avatar
 
Trade: underground
Join Date: Oct 2004
Location: Southeast USA
Posts: 3,228

Re: Help With Excel Formula


Quote:
Originally Posted by jproffer
It depends on what exactly you mean
Your right - I stand corrected. After reading his question again it's clear that I didn't get it. Good call.
PipeGuy is offline  
Old 07-13-2005, 11:31 PM   #6
Repair/Remodeling Tech.
 
jproffer's Avatar
 
Trade: Repair and Remodeling Services
Join Date: Feb 2005
Location: Chester, IL
Posts: 736

Re: Help With Excel Formula


You were right too....as long as 0 or 4 is the only possible numbers...it'll work fine... ...just another way to do the same thing
jproffer is offline  
Old 07-14-2005, 08:52 AM   #7
Senior Life Manager
 
Christine's Avatar
 
Trade: Home Improvement
Join Date: Jun 2005
Location: Central New Jersey
Posts: 58

Re: Help With Excel Formula


Okay, guys. JProffer's formula with the OR works. It will look at all the designated cells and see if ANY ONE of them is equal to or greater than 4. There only needs to be one cell that meets that criteria. Thanks for the help.

Now, any chance I can change the A1,B1,C1,D1 in the formula into a range? Such as A11? I'm going to tinker a bit, but If I could do this then anytime the row gets modified with more/less columns, the equation's range will adjust accordingly.

-Christine
Christine is offline  
Old 07-14-2005, 08:53 AM   #8
Senior Life Manager
 
Christine's Avatar
 
Trade: Home Improvement
Join Date: Jun 2005
Location: Central New Jersey
Posts: 58

Re: Help With Excel Formula


What's up with the grin face in my formula?! A11
Christine is offline  
Old 07-14-2005, 08:54 AM   #9
Senior Life Manager
 
Christine's Avatar
 
Trade: Home Improvement
Join Date: Jun 2005
Location: Central New Jersey
Posts: 58

Re: Help With Excel Formula


AAARRGH! Go away, smiley face!!!!!!!!!!! A1:d1
Christine is offline  
Old 07-14-2005, 10:28 AM   #10
Repair/Remodeling Tech.
 
jproffer's Avatar
 
Trade: Repair and Remodeling Services
Join Date: Feb 2005
Location: Chester, IL
Posts: 736

Re: Help With Excel Formula


Go to: Insert/Name/Define...then at the bottom, in "refers to:" type $A$1:$D$1. Now at the very top name it "myrange" or whatever you want. If you insert a column between A&B or B&C or C&D, the definition will update accordingly, but that's the key you MUST insert any new columns you want included in your range in one of these areas.

EDIT...Kicker is, the definition won't work in your IF statement (I don't think, I'll play with it more when I get some time). We can come up with a workaround I'm sure.

Last edited by jproffer; 07-14-2005 at 10:32 AM.
jproffer is offline  
Old 07-14-2005, 10:38 AM   #11
Repair/Remodeling Tech.
 
jproffer's Avatar
 
Trade: Repair and Remodeling Services
Join Date: Feb 2005
Location: Chester, IL
Posts: 736

Re: Help With Excel Formula


OK, this has only been moderately tested so make sure it works, but:

=IF(SUMIF(myrange,">=4")>=4,45,"")

Put that in place of your "IF" statement after you set your defined range. Let me know if you have any trouble.
jproffer is offline  
Old 07-15-2005, 11:07 AM   #12
Senior Life Manager
 
Christine's Avatar
 
Trade: Home Improvement
Join Date: Jun 2005
Location: Central New Jersey
Posts: 58

Re: Help With Excel Formula


Quote:
Originally Posted by jproffer
OK, this has only been moderately tested so make sure it works, but:

=IF(SUMIF(myrange,">=4")>=4,45,"")

Put that in place of your "IF" statement after you set your defined range. Let me know if you have any trouble.

I don't think this is going to work, nor will any "myrange" because I have rows and rows of data. For instance, my sheet may look like this:

A B C D E

1 3 3 3 3 45 (since no cell in this row is > 4, E1 returns 45)
2 6 2 1 2 91 (since A2 in this row is > 4, E2 returns 91)
3 8 8 8 8 91
4 3 2 1 0 45

Total = 272 (I want to then total E1 through E4, so 45 and 91
must be values)
Christine is offline  
Old 07-15-2005, 04:47 PM   #13
Senior Life Manager
 
Christine's Avatar
 
Trade: Home Improvement
Join Date: Jun 2005
Location: Central New Jersey
Posts: 58

Re: Help With Excel Formula


Quote:
Originally Posted by Hollis
I don't think this is going to work, nor will any "myrange" because I have rows and rows of data. For instance, my sheet may look like this:

A B C D E

1 3 3 3 3 45 (since no cell in this row is > 4, E1 returns 45)
2 6 2 1 2 91 (since A2 in this row is > 4, E2 returns 91)
3 8 8 8 8 91
4 3 2 1 0 45

Total = 272 (I want to then total E1 through E4, so 45 and 91
must be values)
FYI, the formatting got screwed up, but the first column of numbers is the row numbers.
Christine is offline  
Old 07-15-2005, 09:15 PM   #14
Repair/Remodeling Tech.
 
jproffer's Avatar
 
Trade: Repair and Remodeling Services
Join Date: Feb 2005
Location: Chester, IL
Posts: 736

Re: Help With Excel Formula


myrange is the defined range that you would need to setup...

Quote:
Go to: Insert/Name/Define...then at the bottom, in "refers to:" type $A$1:$D$1. Now at the very top name it "myrange" or whatever you want.
You don't have to name it "myrange", you can name it anything, then in your formula you would put whatever name you choose in place of "myrange" in the last formula.

If you can't get it, I can set it up for you and email it to ya

EDIT: BTW, the 45 would be a value. Is that the only 4 rows you have like this? If so I'll set that up and see if I can post it as an attachment here.
jproffer is offline  
Old 07-19-2005, 06:02 PM   #15
Senior Life Manager
 
Christine's Avatar
 
Trade: Home Improvement
Join Date: Jun 2005
Location: Central New Jersey
Posts: 58

Re: Help With Excel Formula


Hey, all. I've been diverted from attending to my excel issue for the past several days and I'll be going out of town for the next week. Will try to follow up on this problem when I return. Thanks for all your efforts! Have a great week. -Christine
Christine is offline  


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ms excel... a super tool POOLMANinCT Technology 20 05-10-2007 09:49 PM
Soffit Backing Formula RadiusFramer Framing 4 03-28-2007 08:31 PM
What formula is used to estimate big remodels? Hurrayconst. General Discussion 3 04-09-2006 11:33 PM
Help with excel AHS Technology 8 03-11-2006 12:53 PM

Join Now... It's Fast and FREE!

Privacy Badge
I am a professional contractor
I am a DIY Homeowner
ContractorTalk.com is for
PROFESSIONAL CONTRACTORS ONLY!

At ContractorTalk.com we cater exlusivly to professional contractors who make their living as a contractor. Knowing that many homeowners and DIYers are looking for a community to call home, we've created www.DIYChatroom.com DIY Chatroom is full of helpful advices and perfect for DIY homeowners.

Redirecing in 10 seconds
No Thanks
terms of service

Already Have an Account?