Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Help with if statement (more than 7)

Awhile back, I came here and found a formula for an IF statement that had
more than 7 IFs. I put it into my spreadsheet and it worked perfectly...well
I saved over it and now it's gone :(

I hope someone here can get me the correct formula again. Here is my problem:
cell AR3 contains the month (1 for July, 2 for August, etc) and changes each
month. Cells BR4:BR19 contain year-to-date totals for our 16 water systems
from the prior year. The IF statement was something like =IF(AR$3<=1, AT4),
IF(AR$3<=2, AT4+AV4), IF(AR$3<=3, AT4+AV4+AX4), etc...

Obviously, this isn't correct because it doesn't work...LOL! I need column
BR to only add January when AR3=1, add January + February when AR3=2, add
January + February + March when AR3=3, etc.

Clear as mud, right? If anyone can help, I will be so very grateful!!!

THANKS!!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Help with if statement (more than 7)


this is the original formula with the 7 if's......

=IF(A14='Foreman''s DTC(7)'!$D$12,'Foreman''s
DTC(7)'!$E$39,IF(A14='Foreman''s DTC(7)'!$F$12,'Foreman''s
DTC(7)'!$G$39,IF(A14='Foreman''s DTC(7)'!$H$12,'Foreman''s
DTC(7)'!$I$39,IF(A14='Foreman''s DTC(7)'!$J$12,'Foreman''s
DTC(7)'!$K$39,IF(A14='Foreman''s DTC(7)'!$L$12,'Foreman''s
DTC(7)'!$M$39,IF(A14='Foreman''s DTC(7)'!$N$12,'Foreman''s
DTC(7)'!$O$39,IF(A14='Foreman''s DTC(7)'!$P$12,'Foreman''s
DTC(7)'!$Q$39,0)))))))

with the help of somebody in this discussion board....this was the end
result....

=IF(ISNA(MATCH($A10,'DTC(1)'!$12:$12,0)),"",INDEX( 'DTC(1)'!$37:$37,MATCH($A10,'DTC(1)'!$12:$12,0)))


hope this helps...
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Help with if statement (more than 7)

Perhaps it was something like:

=IF(AR$3=1,AT4,0)+IF(AR$3=2,AT4+AV4,0)+IF(AR$3=3,A T4+AV4+AX4,0)+...........)

An alternative could be:

=CHOOSE(AR$3,AT4,AT4+AV4,AT4+AV4+AX4,AT4+AV4+AX4+A Z4,AT4+AV4+AX4+AZ4+BB4,
AT4+AV4+AX4+AZ4+BB4+BD4,AT4+AV4+AX4+AZ4+BB4+BD4+BB F4,AT4+AV4+AX4+AZ4+BB4
+BD4+BF4+BH4,AT4+AV4+AX4+AZ4+BB4+BD4+BF4+BH4+BJ4,A T4+AV4+AX4+AZ4+BB4+BD4+
BF4+BH4+BJ4+BL4,AT4+AV4+AX4+AZ4+BB4+BD4+BF4+BH4+BJ 4+BL4+BN4,AT4+AV4+AX4+
AZ4+BB4+BD4+BF4+BH4+BJ4+BL4+BN4+BO4)

This chooses from the number in AR3 either:
AT4
AT4+AV4
AT4+AV4+AX4
AT4+AV4+AX4+AZ4
etc

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Blessedx3" wrote in message
...
Awhile back, I came here and found a formula for an IF statement that had
more than 7 IFs. I put it into my spreadsheet and it worked
perfectly...well
I saved over it and now it's gone :(

I hope someone here can get me the correct formula again. Here is my
problem:
cell AR3 contains the month (1 for July, 2 for August, etc) and changes
each
month. Cells BR4:BR19 contain year-to-date totals for our 16 water
systems
from the prior year. The IF statement was something like =IF(AR$3<=1,
AT4),
IF(AR$3<=2, AT4+AV4), IF(AR$3<=3, AT4+AV4+AX4), etc...

Obviously, this isn't correct because it doesn't work...LOL! I need
column
BR to only add January when AR3=1, add January + February when AR3=2, add
January + February + March when AR3=3, etc.

Clear as mud, right? If anyone can help, I will be so very grateful!!!

THANKS!!!




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help with if statement (more than 7)

Try one of these array formulas** :

If you will *never* insert new columns before the range:

=SUM(IF(MOD(COLUMN(AT4:INDEX(AT4:BP4,AR3*2-1)),2)=0,AT4:INDEX(AT4:BP4,AR3*2-1)))

If you might insert new columns before the range:

=SUM(IF(MOD(COLUMN(AT4:INDEX(AT4:BP4,AR3*2-1))-COLUMN(AT4),2)=0,AT4:INDEX(AT4:BP4,AR3*2-1)))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Blessedx3" wrote in message
...
Awhile back, I came here and found a formula for an IF statement that had
more than 7 IFs. I put it into my spreadsheet and it worked
perfectly...well
I saved over it and now it's gone :(

I hope someone here can get me the correct formula again. Here is my
problem:
cell AR3 contains the month (1 for July, 2 for August, etc) and changes
each
month. Cells BR4:BR19 contain year-to-date totals for our 16 water
systems
from the prior year. The IF statement was something like =IF(AR$3<=1,
AT4),
IF(AR$3<=2, AT4+AV4), IF(AR$3<=3, AT4+AV4+AX4), etc...

Obviously, this isn't correct because it doesn't work...LOL! I need
column
BR to only add January when AR3=1, add January + February when AR3=2, add
January + February + March when AR3=3, etc.

Clear as mud, right? If anyone can help, I will be so very grateful!!!

THANKS!!!



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Help with if statement (more than 7)

Sandy,

The first IF statement works perfectly. Thank you!

"Sandy Mann" wrote:

Perhaps it was something like:

=IF(AR$3=1,AT4,0)+IF(AR$3=2,AT4+AV4,0)+IF(AR$3=3,A T4+AV4+AX4,0)+...........)




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Help with if statement (more than 7)

Thanks for your reply.

"jcheko" wrote:


this is the original formula with the 7 if's......

=IF(A14='Foreman''s DTC(7)'!$D$12,'Foreman''s
DTC(7)'!$E$39,IF(A14='Foreman''s DTC(7)'!$F$12,'Foreman''s
DTC(7)'!$G$39,IF(A14='Foreman''s DTC(7)'!$H$12,'Foreman''s
DTC(7)'!$I$39,IF(A14='Foreman''s DTC(7)'!$J$12,'Foreman''s
DTC(7)'!$K$39,IF(A14='Foreman''s DTC(7)'!$L$12,'Foreman''s
DTC(7)'!$M$39,IF(A14='Foreman''s DTC(7)'!$N$12,'Foreman''s
DTC(7)'!$O$39,IF(A14='Foreman''s DTC(7)'!$P$12,'Foreman''s
DTC(7)'!$Q$39,0)))))))

with the help of somebody in this discussion board....this was the end
result....

=IF(ISNA(MATCH($A10,'DTC(1)'!$12:$12,0)),"",INDEX( 'DTC(1)'!$37:$37,MATCH($A10,'DTC(1)'!$12:$12,0)))


hope this helps...

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Help with if statement (more than 7)

Thanks for your reply.

"T. Valko" wrote:

Try one of these array formulas** :

If you will *never* insert new columns before the range:

=SUM(IF(MOD(COLUMN(AT4:INDEX(AT4:BP4,AR3*2-1)),2)=0,AT4:INDEX(AT4:BP4,AR3*2-1)))

If you might insert new columns before the range:

=SUM(IF(MOD(COLUMN(AT4:INDEX(AT4:BP4,AR3*2-1))-COLUMN(AT4),2)=0,AT4:INDEX(AT4:BP4,AR3*2-1)))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Blessedx3" wrote in message
...
Awhile back, I came here and found a formula for an IF statement that had
more than 7 IFs. I put it into my spreadsheet and it worked
perfectly...well
I saved over it and now it's gone :(

I hope someone here can get me the correct formula again. Here is my
problem:
cell AR3 contains the month (1 for July, 2 for August, etc) and changes
each
month. Cells BR4:BR19 contain year-to-date totals for our 16 water
systems
from the prior year. The IF statement was something like =IF(AR$3<=1,
AT4),
IF(AR$3<=2, AT4+AV4), IF(AR$3<=3, AT4+AV4+AX4), etc...

Obviously, this isn't correct because it doesn't work...LOL! I need
column
BR to only add January when AR3=1, add January + February when AR3=2, add
January + February + March when AR3=3, etc.

Clear as mud, right? If anyone can help, I will be so very grateful!!!

THANKS!!!




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help with if statement (more than 7)

You're welcome!

--
Biff
Microsoft Excel MVP


"Blessedx3" wrote in message
...
Thanks for your reply.

"T. Valko" wrote:

Try one of these array formulas** :

If you will *never* insert new columns before the range:

=SUM(IF(MOD(COLUMN(AT4:INDEX(AT4:BP4,AR3*2-1)),2)=0,AT4:INDEX(AT4:BP4,AR3*2-1)))

If you might insert new columns before the range:

=SUM(IF(MOD(COLUMN(AT4:INDEX(AT4:BP4,AR3*2-1))-COLUMN(AT4),2)=0,AT4:INDEX(AT4:BP4,AR3*2-1)))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Blessedx3" wrote in message
...
Awhile back, I came here and found a formula for an IF statement that
had
more than 7 IFs. I put it into my spreadsheet and it worked
perfectly...well
I saved over it and now it's gone :(

I hope someone here can get me the correct formula again. Here is my
problem:
cell AR3 contains the month (1 for July, 2 for August, etc) and changes
each
month. Cells BR4:BR19 contain year-to-date totals for our 16 water
systems
from the prior year. The IF statement was something like =IF(AR$3<=1,
AT4),
IF(AR$3<=2, AT4+AV4), IF(AR$3<=3, AT4+AV4+AX4), etc...

Obviously, this isn't correct because it doesn't work...LOL! I need
column
BR to only add January when AR3=1, add January + February when AR3=2,
add
January + February + March when AR3=3, etc.

Clear as mud, right? If anyone can help, I will be so very grateful!!!

THANKS!!!






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
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
IF statement(?) contrarian Excel Discussion (Misc queries) 3 September 30th 05 06:14 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


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