Excel formula problem =IF(0<B7<20;1;0)

Need excel to return the value 1 if the value in field B7 is larger tha
0 and smaller than 20.

=IF(B7<20;1;0) kinda works except that if B7 is empty 1 is returned 

I then tried to indicate the range from 0 to 20, by doing this:

=IF(0<B7<20;1;0) this results in excel returning 0 no matter what 
write in field B7

What am I doing wrong?

Flemmin

--
Message posted from http://www.ExcelForum.com

0
8/25/2004 11:07:35 AM
excel.newusers 15348 articles. 2 followers. Follow

4 Replies
1159 Views

Similar Articles

[PageSpeed] 35

Hi
try
=IF(AND(B7>0,B7<20);1;0)

-- 
Regards
Frank Kabel
Frankfurt, Germany


> Need excel to return the value 1 if the value in field B7 is larger
> than 0 and smaller than 20.
> 
> =IF(B7<20;1;0) kinda works except that if B7 is empty 1 is returned
> 
> I then tried to indicate the range from 0 to 20, by doing this:
> 
> =IF(0<B7<20;1;0) this results in excel returning 0 no matter what I
> write in field B7
> 
> What am I doing wrong?
> 
> Flemming
> 
> 
> ---
> Message posted from http://www.ExcelForum.com/
0
frank.kabel (11126)
8/25/2004 11:30:26 AM
One way........

Hi Flemming.........

KYou had the right idea, but you structured the "AND" part of your "IF"
statement
a little wrong.  Frank shows you how to do it properly with his formula of

  =IF(AND(B7>0,B7<20);1;0)  only thing is, he used semicolons where my
version
of Excel  (and maybe yours), requires commas......like

=IF(AND(A1>0,A1<20),1,0)

Another way to get the job done would be.......

=--IF(A1>0,IF(A1<20,1,0))


Vaya con Dios,
Chuck, CABGx3



"flemminga >" <<flemminga.1bjjyl@excelforum-nospam.com> wrote in message
news:flemminga.1bjjyl@excelforum-nospam.com...
> Need excel to return the value 1 if the value in field B7 is larger than
> 0 and smaller than 20.
>
> =IF(B7<20;1;0) kinda works except that if B7 is empty 1 is returned
>
> I then tried to indicate the range from 0 to 20, by doing this:
>
> =IF(0<B7<20;1;0) this results in excel returning 0 no matter what I
> write in field B7
>
> What am I doing wrong?
>
> Flemming
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>


0
croberts1 (105)
8/25/2004 12:24:04 PM
Hi Chuck,

Out of interest why did you use the double unary with the IF formulas?
Using a double unary you can miss out the IF's altogether as in:

=--AND(A1>0,A1<20)

Regards

Sandy

-- 
to e-mail direct replace @mailintor.com with @tiscali.co.uk

"CLR" <croberts@hitechled.com> wrote in message
news:evYgq5piEHA.2808@TK2MSFTNGP10.phx.gbl...
> One way........
>
> Hi Flemming.........
>
> KYou had the right idea, but you structured the "AND" part of your "IF"
> statement
> a little wrong.  Frank shows you how to do it properly with his formula of
>
>   =IF(AND(B7>0,B7<20);1;0)  only thing is, he used semicolons where my
> version
> of Excel  (and maybe yours), requires commas......like
>
> =IF(AND(A1>0,A1<20),1,0)
>
> Another way to get the job done would be.......
>
> =--IF(A1>0,IF(A1<20,1,0))
>
>
> Vaya con Dios,
> Chuck, CABGx3
>
>
>
> "flemminga >" <<flemminga.1bjjyl@excelforum-nospam.com> wrote in message
> news:flemminga.1bjjyl@excelforum-nospam.com...
> > Need excel to return the value 1 if the value in field B7 is larger than
> > 0 and smaller than 20.
> >
> > =IF(B7<20;1;0) kinda works except that if B7 is empty 1 is returned
> >
> > I then tried to indicate the range from 0 to 20, by doing this:
> >
> > =IF(0<B7<20;1;0) this results in excel returning 0 no matter what I
> > write in field B7
> >
> > What am I doing wrong?
> >
> > Flemming
> >
> >
> > ---
> > Message posted from http://www.ExcelForum.com/
> >
>
>


0
sandymann (252)
8/25/2004 10:03:59 PM
I just came home from a congress to find all your answers. Thank yo
very much guys! This not only solved the current problem but also gav
me some much needed insight into excel syntax.
Thank you once again
Flemmin

--
Message posted from http://www.ExcelForum.com

0
9/2/2004 7:58:05 AM
Reply:

Similar Artilces:

Question -Problem
Has anybody ever seen an error message (0x800cccF6) message? I cannot configure my Outlook to retrieve Hotmail. Works with other profiles on this computer running winxp. Stan-The-Man-2006 wrote: > Has anybody ever seen an error message (0x800cccF6) message? I cannot > configure my Outlook to retrieve Hotmail. Works with other profiles > on this computer running winxp. If you have a free Hotmail account, note that it won't work anymore (even your other profiles will eventually have problems) - see http://www.slipstick.com/addins/services/online.htm#hotmail ...

AD Sync problem
Hello, One of my DC was disconnected from the network for quite a long time and cannot be synchronized with AD anymore. I have been trying to apply the http://support.microsoft.com/kb/325850/en-us procedure to reset the machine account password. After launching the command "netdom resetpwd /S: ....." I've got the following error message : "The machine account password for the local machine could not be reset. Echec d'ouverture de session : unknown user or incorrect password. The command failed to complete successfully." ANy idea to help me ? Man...

Formula without using numbers after decimal in the answer
I have a formula that derives the answer from a figure with a decimal. I don't want to use the figures after the decimal. Is there a way to just use the whole number and omit the numbers after the decimal without having to manually key in all these numbers manually? Thanks, Mustang You can use the INT function. This 'rounds down' any number to th nearest integer, e.g. if A1=2.567, a formula in B2 of =INT(A1) return 2 HTH Bruc -- swatsp0 ----------------------------------------------------------------------- swatsp0p's Profile: http://www.excelforum.com/member.php?...

WCF Client serialization problem
I posted the problem on another forum, and to prevent duplicate posts, but get as many professionals as possible to look at it, I include the url in this post. Please help! http://stackoverflow.com/questions/2948657/migrating-webclient-to-wcf-wcf-client-serializes-parametername-of-method ...

Excel button problem
Hi All I have a macro that copies a worksheet in the active workbook and puts it into a new workbook - then formats it and deletes any buttons on the worksheet. On the first click on the button the macro works ok. On the second click, it fails because the all assigned macros on all buttons in the active workbook changed from "mba" to "book1!mba". Book 1 doesn't exists (wasn't opened, wasn't saved, doesn't have the macros). I've never experienced this problem before?? Can anyone help to solve this problem? FYI The macro to do this is c...

Looking for Excel Help
I'm a very novice Excel user and am looking for a little help with creating a formula for a spreadsheet I'm creating for my personal use. I would appreciate some assistance if possible. Thanks in advance. Dan --- Message posted from http://www.ExcelForum.com/ Hi Dan! Post a sample of what you want to do. Your question is just a tad open ended <g> -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. "DanB4105" <DanB4105.ywtpa@excelfor...

New to excel
Hi All, I'm new to Excel ( and to this forum :) ) and so I hope somebody may b able to help me. I've got 2 questions.... QUESTION 1 I've got a spreadsheet which takes data from one worksheet and uses i to calculate data in a second worksheet using the following code formula: =IF('4th November 2005'!B19="","nothing here dude",IF(B19<'4th Novembe 2005'!B19,"UP",IF(B19='4th November 2005'!B19,"Same",IF(B19>'4t November 2005'!B19,"DOWN")))) The problem is, when I create a new worksheet I have...

Microsoft CRM 3.0 Installation 11-08-07
Good Day board, Quick and to the point. I'm installing a trial copy of Microsoft CRM 3.0 that I got at a computer conference recently and I've gotten everything to work in the System Requirements dialog except that it's telling me that "The minimum required version is SQL Server 2000 SP4 (8.0.2026)". Strange this is that I do believe that I have SQL Server 2005 installed on the machine. Any idea how to be absolutely sure of what version I have installed? Have you choosed the right name of SQL server during installation set- up?` You have to make it sure if it is ...

Excel 97 #9
Please can anyone help??? I have two columns in Excel 97. The first contains a list of statu values eg. pending, or granted or withdrawn. The second contains date eg.01/12/1997, 05/06/2003. I woudl like to know how to get all th granted apps before 31/12/2003. Can anyone help please -- Message posted from http://www.ExcelForum.com theres many ways, but an easiest way would be to do a sort. Highlight the 2 columns, click on data, then sort, then sort by status, then by date. this should group them all together. hope this helps...toe >-----Original Message----- >Please can anyo...

Problems with reallocations in the Advanced Budget
I am a using the Advanced Budget in Money and for years I have reallocated money between categories and months. recently when I updated my transactions all my real locations were wrong. Basically the money I allocated from March to February was not only back in February it reversed it and made it look like I sent Money from February to March so now any category that I have reallocated money (an that is most) is wrong. Does anyone know of a way to fix this, I have run the repair, but that did nothing. Microsoft Money Plus Premium Version 17.0.125.1415 I am so glad to see that I am...

Autonumber created.. problems in the future?
I managed to create an autonumber in Microsoft CRM. I did this by making a field "Number"(in the database "New_Number") and I published it on the form. Then I went To the SQL server and I changed the field in the table to Identity Yes, Identity seed 1, Identity Increment 1. I locked the field on the form. It worked! I think that this is not supported by Microsoft. But has anybody got any idea which troubles i could get with this configuration? San ________________________________ Do you know all add-ons for Microsoft CRM? Visit http://www.pimpmycrm.com The biggest dange...

Count If Formula #4
I need a formula that will figure the following: If column C = 3, count all times < 00:45 If column C = 4, count all times < 00:45 If column C = 3, count all times > 00:46 Thanks. Your description is a bit confused.You have different actions for the same value (C=3). And where are the times, in a different column than C? So, making many assumptions, perhaps =SUMPRODUCT(--(ISNUMBER(MATCH(C1:C200,{3,4},0))),--(D1:D200<TIME(0,45,0)))+S UMPRODUCT(--(C1:C200=5),--(D1:D200<TIME(0,46,0))) -- HTH RP (remove nothere from the email address if mailing direct) "Denise"...

Excel corrupts when asking to update vlookups
We are experiencing weird behavior with some Office 2K3 Excel spreadsheets that contain lots of calculations, but no macros. On some pc’s Excel acts normally, on others you get the error. I have a couple of screen shots available. Any help is appreciated. If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the subject line 3. You send a clear explanation of what you want 4. You send before/after examples and expected results. -- Don Gu...

Uninstall of mappoint has caused errors with excel
Hi, I am running Office 2003 on the terminal server (windows 2003) and had a copy of mappoint as well. This is a mapping program. We ininstalled mappoint which has caused an error message with Excel and other office products. The error says "Cd:\documents and settings\administrator.ocrdc1\application data\microsoft\addins c:\Program files\common files\microsoft shared\geography\mpoai9.dll is not a valid add-in." I then click OK and excel opens up and everything is fine. The problem is that we are using other programs as well such as Quickbooks that export to excel and t...

message delivery problems
Hello! There are several email address that when I send them an e-mail, they just sit in the Queue. I did message tracking and its telling me that "Message Routed and Queued for Remote Delivery". Can anyone suggest symptoms for this? Thank You! usually messages sitting in outgoing queue take time due to DNS related issues. Do you have issues performing NSlookups on any domains from your workstation? Can you perform the same NSlookups from the exchange server? From the exchange server, can you perform smtp communication directly to the mailserver that would receive the e...

Offline Synchronization Problem #2
I get the following error when I try going offline. The excelption is taken from Event Viewer of the Client Machine. Event Type: Error Event Source: MSCRMOfflineSync Event Category: None Event ID: 6000 Date: 3/25/2008 Time: 5:03:33 PM User: N/A Computer: WINXP Description: An error occurred during Offline Synchronization. Try going offline again, or restart Microsoft Outlook. saInsert failed for entity 'ActivityMimeAttachment', batchRows=0 with exception System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument li...

Formula for Game Spreadsheet
I am currenly playing a game of Ars Magica. I am using a spreadsheet to compute the info for my character. I am having a probllem with the casting total for spells related to a paticular character. The Formula is as follows : =IF(H13="","--",IF(J13="",INDIRECT(H13),MIN(INDIRECT(H13),INDIRECT(LEFT(J13,2)),INDIRECT(RIGHT(J13,2))))+IF(K13="",INDIRECT(I13),MIN(INDIRECT(I13),INDIRECT(LEFT(K13,2)),INDIRECT(RIGHT(K13,2))))+Sta+IF(N13="",0,$H$2)) I am trying to compute the casting total for the spells castable by this character. The total for the ...

How do I Remove a Split from my Comments in Excel 2003? #2
I have set my current workbook to split/freeze the first column and first 2 rows. Now, when I add a comment to the second row (in any column) my comments are cut off if I should scroll down. I don't ever remember the behavior before. And I don't know what I've done to enable it but it's really annoying. How do turn this off ? ...

learning Excel #3
Hi, I was considering learning Excel as an additional tool for my data analysis work. Is it better to use data sets that I have previously used with SPSS and apply the same analysis tools as in SPSS? For applying the appropriate tools, I was considering using excel's online help. The second option I have is to use some excel book for data analysis and apply the techniques to data sets provided with the book. Any suggestions????? regards Metal ...

unable to paste Excel 2003 chart into Outlook 2003
(This was posted on "excel.charting" group.) I have a user who's unable to paste an Excel 2003 chart into Outlook 2003 email message. In Outlook options, the checkbox is selected for "Use Microsoft Office Word 2003 to edit e-mail messages". When I tested this on my own computer running the same version of Office, if the box is check, I have no problem pasting; if this box is cleared, I cannot paste. But on his computer, it doesn't work regardless. Thanks and regards, TL ...

Setting a dynamic range in a formula
Hi, I have a column of numbers and I always want the following arra formula to use the last 12 entries: =(PRODUCT(1+D1:D12/100)-1)*100 Any suggestions? Thanks, Phillycheese -- Phillycheese ----------------------------------------------------------------------- Phillycheese5's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2419 View this thread: http://www.excelforum.com/showthread.php?threadid=37809 Assuming that Column D contains no blanks, try... =(PRODUCT(1+OFFSET(D1,MAX(0,COUNTA(D:D)-12),0,12,1)/100)-1)*100 ...confirmed with CONTROL+SHIFT+ENTER. Hope th...

Over Time Pay rate 1.51?
Its that time of year again, Audit time. The auditors have come across a very strange problem it seems that around October of last year random employees have had there OT pay rates increased to 1.51 (instead of the standard 1.50), I cant for the life of me figure out how this has come to be. Has anyone come across this problem before? And is there something I can do to fix or prevent this from reoccurring? It’s just not feasible to check each employee every week before payroll. Im certain that the employees were setup correctly initially. Thanks I have seen this and have not been ab...

Problem with Range
Hello All, Using Windows & Excel XP. I have a worksheet that has times located in every other column, A1:A30, C1:C30, E1:E30. I then name the range "times". I want to find the count of times that are between 0:30:00 and 0:39:59 (30 and 39:59 minutes). I write the formula: =COUNTIF(times,">=" & TIME(0,30,0)) - COUNTIF(times,">=" & TIME(0,39,59)) but get the error #VALUE! I have tried writing a formula for times in one column and consecutive columns and it gives the correct count, it is just when the times in every other column that th...

formula or VBA
I need to search through a column checking condtions. If the conditions are met, then I want to enter the corresponding value in the column next to it into a different cell. Basically, I want to search column A and, if the conditions are met, put the value in B into C. Would this be easier via formula or code? And maybe some starting suggestions would be nice if you don't mind. -- Thanks, Jim in a formula in col b =if(cond,a1,"") using vba for each c in range("a1:a100") if cond then c.offset(0,1)=c next -- Don Guillett SalesAid Software donaldb@281.com "...

Having problem with spoofing email
Our users just received multiple email from different users outside the company. In the To: line, it shows his user name correctly but when he print those email, the To: line was showing somebody else name on the print out. Is there a way to block this behavior? I'm using E2k3. For some reason our spam (postini) didn't pick up these emails. Thank you, Could you please post the message in raw format (including the mail headers) Petch wrote: > Our users just received multiple email from different users outside the > company. In the To: line, it shows his user name cor...