Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
edwardpestian
 
Posts: n/a
Default Can I add an IF statement


I would like to know if I can add another IF statement to the following
formula. For example IF cell H9 = "Day" then perform the function.

Thanks.

EP

=IF(Date=0,"",OFFSET(Data!$E$5,ROW(A1)+100,MATCH(G 8,Data!$F$3:$CT$3,0)))


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=539484

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
systemx
 
Posts: n/a
Default Can I add an IF statement


Try -

=IF(H9="Day",IF(Date=0,"",OFFSET(Data!$E$5,ROW(A1) +100,MATCH(G
8,Data!$F$3:$CT$3,0))),"What to do if H9 does not equal Day")

That should work.

You can 'nest' up to 7 IF statements in one formula - after that it can
get a little more complicated. :)

Regards,

Rob :)


--
systemx
------------------------------------------------------------------------
systemx's Profile: http://www.excelforum.com/member.php...o&userid=29254
View this thread: http://www.excelforum.com/showthread...hreadid=539484

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Can I add an IF statement

"edwardpestian" wrote:
I would like to know if I can add another IF statement to the
following formula. For example IF cell H9 = "Day" then perform
the function.
[....]
=IF(Date=0,"",OFFSET(Data!$E$5,ROW(A1)+100,
MATCH(G8,Data!$F$3:$CT$3,0)))


The short answer is: yes. But your intended logic is not clear.
The following might what you really want:

=if(or(Date=0, H9!="Day"), "", offset(...))

In other words, compute offset(...) only if Date is non-zero __and__
H9 is "Day". Alternatively, the following might be what you want:

=if(and(Date=0, H9!="Day"), "", offset(...))

That is, compute offset(...) if Date is non-zero __or__ H9 is "Day".
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
macropod
 
Posts: n/a
Default Can I add an IF statement

Hi EP,

Try:
if either Date should < 0 or H9 should = "Day":
=IF(OR(Date=0,H9<"Day"),"",OFFSET(Data!$E$5,ROW(A 1)+100,MATCH(G8,Data!$F$3:
$CT$3,0)))
or, if both Date should < 0 and H9 should = "Day":
=IF(AND(Date=0,H9<"Day"),"",OFFSET(Data!$E$5,ROW( A1)+100,MATCH(G8,Data!$F$3
:$CT$3,0)))

Cheers

"edwardpestian"
wrote in message
news:edwardpestian.27dd5a_1146891001.7016@excelfor um-nospam.com...

I would like to know if I can add another IF statement to the following
formula. For example IF cell H9 = "Day" then perform the function.

Thanks.

EP

=IF(Date=0,"",OFFSET(Data!$E$5,ROW(A1)+100,MATCH(G 8,Data!$F$3:$CT$3,0)))


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile:

http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=539484



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
edwardpestian
 
Posts: n/a
Default Can I add an IF statement


Ultimaly what I'm trying to do is perform this calaculation but add in
another criteria. For Example:

If G8=Date AND G9="Day", then perform the following function. G8 will
remain a constant; it will alws be a date, but H9 will Change.


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=539484



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
edwardpestian
 
Posts: n/a
Default Can I add an IF statement


I need all three sub criteria to perform the same function. Whatever
the date in G9 is, and the shift in H9 is, then perform the function to
look the data up.

THe function works properly when I have it pull data based on the date
(g9); but I cannot get it to work with the second critera.

Thannks All:EP

=IF(Date=0,"",OFFSET(Data!$E$5,ROW(A1)+100,MATCH(G 8,Data!$F$3:$CT$3,0)))


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=539484

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
edwardpestian
 
Posts: n/a
Default Can I add an IF statement


Okay, so I've got the above formula below working as needed; but I need
to add to it.

I need it to perform the same OFFSET function, except with a change to
the range. I need it to calculate based off of (A1)+101 IF H8<"Swing"


=IF(OR(Date=0,$H$8<"Day"),"",OFFSET(Data!$E$5,ROW ($A$1)+101,MATCH($G$8,Data!$F$3:$CT$3,0)))

I'm stuck on this one for days...

Thanks in advance for any help or feedback.

EP


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=539484

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
edwardpestian
 
Posts: n/a
Default Can I add an IF statement


Okay All, I was able to get to work using the following:

=IF($H$8="Day",OFFSET(Data!$E$5,ROW($A$1)+101,MATC H($G$8,Data!$F$3:$CT$3,0)),IF($H$8="Swing",OFFSET( Data!$E$5,ROW($A$1)+102,MATCH($G$8,Data!$F$3:$CT$3 ,0)),IF($H$8="Grave",OFFSET(Data!$E$5,ROW($A$1)+10 3,MATCH($G$8,Data!$F$3:$CT$3,0)))))

Thanks for your help.

EP


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=539484

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Can I add an IF statement

Hi!

Try this:

=IF($H$8="","",OFFSET(Data!$E$5,MATCH($H$8,{"Day", "Swing","Grave"},0)+101,MATCH($G$8,Data!$F$3:$CT$3 ,0)))

Biff

"edwardpestian"
wrote in message
news:edwardpestian.27dw4m_1146915601.6324@excelfor um-nospam.com...

Okay All, I was able to get to work using the following:

=IF($H$8="Day",OFFSET(Data!$E$5,ROW($A$1)+101,MATC H($G$8,Data!$F$3:$CT$3,0)),IF($H$8="Swing",OFFSET( Data!$E$5,ROW($A$1)+102,MATCH($G$8,Data!$F$3:$CT$3 ,0)),IF($H$8="Grave",OFFSET(Data!$E$5,ROW($A$1)+10 3,MATCH($G$8,Data!$F$3:$CT$3,0)))))

Thanks for your help.

EP


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile:
http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=539484



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
edwardpestian
 
Posts: n/a
Default Can I add an IF statement


Worked great Biff. And much more eloquent than my version.

Thanks.

EP


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=539484



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Can I add an IF statement

You're welcome. Thanks for the feedback!

Biff

"edwardpestian"
wrote in message
news:edwardpestian.27ejqn_1146946202.945@excelforu m-nospam.com...

Worked great Biff. And much more eloquent than my version.

Thanks.

EP


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile:
http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=539484



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
reconcile two months statement? achilles Excel Discussion (Misc queries) 0 March 17th 06 03:47 AM
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
Long IF Statement rmitchell87 Excel Discussion (Misc queries) 2 October 2nd 05 03:50 AM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM


All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"