Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default IF statement in Array Formula's

Hi,

I want to add a conditional If statement to the following Array Formula;

=A2+IF(B$2=0,0,SIGN(B$2)*SMALL(IF((WEEKDAY(A2+SIGN (B$2)*(ROW(INDIRECT("1:"&ABS(B$2)*10))),2)<6)*ISNA (MATCH(A2+SIGN(B$2)*(ROW(INDIRECT("1:"&ABS(B$2)*10 ))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2)*10))),A BS(B$2)))

Whereby if A2 is blank (""), then put blank, otherwise perform the above
formula, how should this formula look, as i've tried doing it severall ways
and struggled on all.

Thansk


  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF statement in Array Formula's

Whereby if A2 is blank (""), then put blank, otherwise perform .. formula,

Try adding a front check, viz.:
=IF(A2="","", <your_array_formula)
Remember to array-enter ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"sdg8481" wrote:
Hi,

I want to add a conditional If statement to the following Array Formula;

=A2+IF(B$2=0,0,SIGN(B$2)*SMALL(IF((WEEKDAY(A2+SIGN (B$2)*(ROW(INDIRECT("1:"&ABS(B$2)*10))),2)<6)*ISNA (MATCH(A2+SIGN(B$2)*(ROW(INDIRECT("1:"&ABS(B$2)*10 ))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2)*10))),A BS(B$2)))

Whereby if A2 is blank (""), then put blank, otherwise perform the above
formula, how should this formula look, as i've tried doing it severall ways
and struggled on all.

Thansk


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default IF statement in Array Formula's

Hi Thanks, but unfortunately i've already tried that and it doesn't work,
either that or i'm missing something, any other ideas. Thanks


"Max" wrote:

Whereby if A2 is blank (""), then put blank, otherwise perform .. formula,


Try adding a front check, viz.:
=IF(A2="","", <your_array_formula)
Remember to array-enter ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"sdg8481" wrote:
Hi,

I want to add a conditional If statement to the following Array Formula;

=A2+IF(B$2=0,0,SIGN(B$2)*SMALL(IF((WEEKDAY(A2+SIGN (B$2)*(ROW(INDIRECT("1:"&ABS(B$2)*10))),2)<6)*ISNA (MATCH(A2+SIGN(B$2)*(ROW(INDIRECT("1:"&ABS(B$2)*10 ))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2)*10))),A BS(B$2)))

Whereby if A2 is blank (""), then put blank, otherwise perform the above
formula, how should this formula look, as i've tried doing it severall ways
and struggled on all.

Thansk


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default IF statement in Array Formula's

=IF(OR(A2="",B$2=0),0,A2+SIGN(B$2)*SMALL(IF((WEEKD AY(A2+SIGN(B$2)*(ROW(INDIR
ECT("1:"&ABS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B $2)*(ROW(INDIRECT("1:"&ABS
(B$2)*10))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2) *10))),ABS(B$2)))

or perhaps

=A2+IF(OR(A2="",B$2=0),0,SIGN(B$2)*SMALL(IF((WEEKD AY(A2+SIGN(B$2)*(ROW(INDIR
ECT("1:"&ABS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B $2)*(ROW(INDIRECT("1:"&ABS
(B$2)*10))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2) *10))),ABS(B$2)))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"sdg8481" wrote in message
...
Hi Thanks, but unfortunately i've already tried that and it doesn't work,
either that or i'm missing something, any other ideas. Thanks


"Max" wrote:

Whereby if A2 is blank (""), then put blank, otherwise perform ..

formula,

Try adding a front check, viz.:
=IF(A2="","", <your_array_formula)
Remember to array-enter ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"sdg8481" wrote:
Hi,

I want to add a conditional If statement to the following Array

Formula;


=A2+IF(B$2=0,0,SIGN(B$2)*SMALL(IF((WEEKDAY(A2+SIGN (B$2)*(ROW(INDIRECT("1:"&A
BS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B$2)*(ROW(I NDIRECT("1:"&ABS(B$2)*10))
),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2)*10))),ABS (B$2)))

Whereby if A2 is blank (""), then put blank, otherwise perform the

above
formula, how should this formula look, as i've tried doing it severall

ways
and struggled on all.

Thansk




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default IF statement in Array Formula's

Perfect. Thank You Very Much

"Bob Phillips" wrote:

=IF(OR(A2="",B$2=0),0,A2+SIGN(B$2)*SMALL(IF((WEEKD AY(A2+SIGN(B$2)*(ROW(INDIR
ECT("1:"&ABS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B $2)*(ROW(INDIRECT("1:"&ABS
(B$2)*10))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2) *10))),ABS(B$2)))

or perhaps

=A2+IF(OR(A2="",B$2=0),0,SIGN(B$2)*SMALL(IF((WEEKD AY(A2+SIGN(B$2)*(ROW(INDIR
ECT("1:"&ABS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B $2)*(ROW(INDIRECT("1:"&ABS
(B$2)*10))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2) *10))),ABS(B$2)))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"sdg8481" wrote in message
...
Hi Thanks, but unfortunately i've already tried that and it doesn't work,
either that or i'm missing something, any other ideas. Thanks


"Max" wrote:

Whereby if A2 is blank (""), then put blank, otherwise perform ..

formula,

Try adding a front check, viz.:
=IF(A2="","", <your_array_formula)
Remember to array-enter ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"sdg8481" wrote:
Hi,

I want to add a conditional If statement to the following Array

Formula;


=A2+IF(B$2=0,0,SIGN(B$2)*SMALL(IF((WEEKDAY(A2+SIGN (B$2)*(ROW(INDIRECT("1:"&A
BS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B$2)*(ROW(I NDIRECT("1:"&ABS(B$2)*10))
),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2)*10))),ABS (B$2)))

Whereby if A2 is blank (""), then put blank, otherwise perform the

above
formula, how should this formula look, as i've tried doing it severall

ways
and struggled on all.

Thansk







  #6   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF statement in Array Formula's

Bob, thanks for the help. Glad that did it for the OP. Admit I was lazy in
not testing out the simple front bolt-on. Just wondering why the simple:
=IF(A2="","",...) doesn't get accepted in this instance.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Bob Phillips" wrote:
=IF(OR(A2="",B$2=0),0,A2+SIGN(B$2)*SMALL(IF((WEEKD AY(A2+SIGN(B$2)*(ROW(INDIR
ECT("1:"&ABS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B $2)*(ROW(INDIRECT("1:"&ABS
(B$2)*10))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2) *10))),ABS(B$2)))

or perhaps

=A2+IF(OR(A2="",B$2=0),0,SIGN(B$2)*SMALL(IF((WEEKD AY(A2+SIGN(B$2)*(ROW(INDIR
ECT("1:"&ABS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B $2)*(ROW(INDIRECT("1:"&ABS
(B$2)*10))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2) *10))),ABS(B$2)))

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default IF statement in Array Formula's

I think it would have if it had been correctly interpreted. The thing that I
noticed Max was that the A2 was outside his original IF. I therefore thought
that the way that you wrote it wouldn't return A2 if A2 was not blank but B2
was blank/zero (as per his original), and if he had tried it, he may have
got the syntax wrong. So I thought best to be explicit.

Regards

Bob

"Max" wrote in message
...
Bob, thanks for the help. Glad that did it for the OP. Admit I was lazy

in
not testing out the simple front bolt-on. Just wondering why the simple:
=IF(A2="","",...) doesn't get accepted in this instance.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Bob Phillips" wrote:

=IF(OR(A2="",B$2=0),0,A2+SIGN(B$2)*SMALL(IF((WEEKD AY(A2+SIGN(B$2)*(ROW(INDIR

ECT("1:"&ABS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B $2)*(ROW(INDIRECT("1:"&ABS
(B$2)*10))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2) *10))),ABS(B$2)))

or perhaps


=A2+IF(OR(A2="",B$2=0),0,SIGN(B$2)*SMALL(IF((WEEKD AY(A2+SIGN(B$2)*(ROW(INDIR

ECT("1:"&ABS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B $2)*(ROW(INDIRECT("1:"&ABS
(B$2)*10))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2) *10))),ABS(B$2)))



  #8   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF statement in Array Formula's

"Bob Phillips" wrote:
I think it would have if it had been correctly interpreted. The thing that I
noticed Max was that the A2 was outside his original IF. I therefore thought
that the way that you wrote it wouldn't return A2 if A2 was not blank but B2
was blank/zero (as per his original), and if he had tried it, he may have
got the syntax wrong. So I thought best to be explicit.


Thanks for the thoughts, Bob. Cheers.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
defintion of array function R..VENKATARAMAN Excel Discussion (Misc queries) 2 April 21st 06 03:21 AM
Creating Array formulas with multiple criteria Space Elf Excel Worksheet Functions 2 January 15th 06 01:23 PM
Can someone please explain array formulas to me? KMHarpe Excel Discussion (Misc queries) 2 July 20th 05 08:35 PM
array formulas johnT Excel Worksheet Functions 14 March 29th 05 08:35 AM


All times are GMT +1. The time now is 03:09 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"