MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Jun 20th, 2003, 06:18 PM   #1
Rains
 
Join Date: Jun 2003
Posts: 9
Default IF formula

I am currently struggling with a formula within excel. I have created a list box and a list of dates with the cell link in cell F1. i have a value in cell E7 and a number in AH4. my formula is :-

=if(and(F1=1,E7>0),AH4+1,AH4)

What i'm trying to achieve is that if F1 does not = 1 and E7 is not > 0 then display nothing, zilch..... but it will always display the value in AH4 ???


Help anybody please.....

[/b]
Rains is offline   Reply With Quote
Old Jun 20th, 2003, 06:27 PM   #2
LTunnicliffe
 
LTunnicliffe's Avatar
 
Join Date: May 2003
Location: Round Rock, TX
Posts: 767
Default Re: IF formula

Well, try:

=if(and(F1=1, E7<0),YourFormula,0)

I'm not sure what your formula is but you can put it in there. Hope this helps!
__________________
Loren

The numbers don't lie, but sometimes they don't tell the whole truth.
LTunnicliffe is offline   Reply With Quote
Old Jun 20th, 2003, 06:38 PM   #3
TheClayTaurus
 
Join Date: May 2003
Location: Severna Park
Posts: 170
Default Re: IF formula

you haven't put anything in to tell it to put "zilch" in

right now its always going to either output AH4+1 or AH4

make sense?
TheClayTaurus is offline   Reply With Quote
Old Jun 20th, 2003, 06:59 PM   #4
HalfAce
MrExcel MVP
 
Join Date: Apr 2003
Location: Alaska
Posts: 7,332
Default Re: IF formula

Try this:

=IF(AND(F1=1,E7>0),AH4+1,””)

Hope it helps.
HalfAce is offline   Reply With Quote
Old Jun 23rd, 2003, 04:40 PM   #5
Rains
 
Join Date: Jun 2003
Posts: 9
Default Re: IF formula

Thank you all for you responses but maybe i should elaborate further :-

=IF(AND(F1=1,E7>0),AH4+1,””) works fine but what i really want is to say that

=IF(AND(F1=1,E7>0),AH4+1,AH4,"") what i want is a 3rd statement ???

i don't what the cell to show any figures if F1=1, E7>0 is false bit if true then i want either AH4+1 or AH4...

I know this sounds confusing but it would be easier to show than explain!!!

Rains is offline   Reply With Quote
Old Jun 23rd, 2003, 04:55 PM   #6
Northerner
 
Join Date: Nov 2002
Posts: 149
Default Re: IF formula

Not sure what you third requirement is but Nest your IFs.
IF(AND(A1=1,B1=1),"A1+B1=1",IF(and(A1=1,B1=2),"A1=1 and B1=2"),"Nothing")

You can 'Nest' up to 7 IFs within themselves.
Hope this helps
Northerner is offline   Reply With Quote
Old Jun 23rd, 2003, 06:45 PM   #7
bosco_yip
 
Join Date: Dec 2002
Posts: 673
Default Re: IF formula

1) Your F1 appeared not a value, so that the formula cannot be worked

2) Try :
=IF(AND(F1=1&"",E7>0),AH4+1,AH4)

Hope can helps

Regards
Bosco
bosco_yip is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On

Forum Jump


All times are GMT +1. The time now is 10:11 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.