Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Sum(indirect(Address......

Hello,

I am trying to produce a formula that will give the last 4 weeks average
from a Row that contains the daily figures followed by the weely averages i.e
A B C D E F G H I J K

1 Sun Mon Tue Wed Thu Fri Sat Average Sun Mon Tue etc etc
2 5 4 5 4 5 4 5 4.5714 5 5 4
etc etc

The weekly average is setup so if there is no data then it returns "". What
i am doing is finding the last active cell on the column and then using that
to set the cell range for the sum and count to produce the averages.

This is a snippet of the formula that i am using


=SUM(INDIRECT(ADDRESS(ROW(),MATCH(LOOKUP(100^100,$ A10:$FO10),$A10:$FO10,FALSE))):INDIRECT(ADDRESS(RO W(),MATCH(LOOKUP(100^100,$A10:$FO10),$A10:$FO10,FA LSE))))

The problem that i have is... the lookup runs right to left but the match
runs left to right. Therefore the lookup finds the value of the last cell
which should be the average of the current week but then if there is another
instance of the lookup value on the same row then the Match stops at that
cell.

is there a way to get Match to run Right to Left in line with the lookup or
is there an easier way to do what i am attempting?

Please HELP!!!!
--
Kevin Smith :o)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Sum(indirect(Address......

Try the below

Array entered (Apply formul using Ctrl+Shift+Enter instead of just Enter)
=SUM(LOOKUP(LARGE(IF((ISNUMBER(2:2)*(1:1="Average" )),COLUMN(2:2)),ROW(1:4)),COLUMN(2:2),2:2))/4

Make sure you have atleast 4 average cells ..The formula picks up values of
the last 4 cells in Row 2 the corresponding cells in Row1 contains the text
'Average'

--
Jacob


"Kevin Smith" wrote:

Hello,

I am trying to produce a formula that will give the last 4 weeks average
from a Row that contains the daily figures followed by the weely averages i.e
A B C D E F G H I J K

1 Sun Mon Tue Wed Thu Fri Sat Average Sun Mon Tue etc etc
2 5 4 5 4 5 4 5 4.5714 5 5 4
etc etc

The weekly average is setup so if there is no data then it returns "". What
i am doing is finding the last active cell on the column and then using that
to set the cell range for the sum and count to produce the averages.

This is a snippet of the formula that i am using


=SUM(INDIRECT(ADDRESS(ROW(),MATCH(LOOKUP(100^100,$ A10:$FO10),$A10:$FO10,FALSE))):INDIRECT(ADDRESS(RO W(),MATCH(LOOKUP(100^100,$A10:$FO10),$A10:$FO10,FA LSE))))

The problem that i have is... the lookup runs right to left but the match
runs left to right. Therefore the lookup finds the value of the last cell
which should be the average of the current week but then if there is another
instance of the lookup value on the same row then the Match stops at that
cell.

is there a way to get Match to run Right to Left in line with the lookup or
is there an easier way to do what i am attempting?

Please HELP!!!!
--
Kevin Smith :o)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Sum(indirect(Address......

OR..
=AVERAGE(LOOKUP(LARGE(IF((ISNUMBER(2:2)*(1:1="Aver age")),
COLUMN(2:2)),ROW(1:4)),COLUMN(2:2),2:2))

--
Jacob


"Jacob Skaria" wrote:

Try the below

Array entered (Apply formul using Ctrl+Shift+Enter instead of just Enter)
=SUM(LOOKUP(LARGE(IF((ISNUMBER(2:2)*(1:1="Average" )),COLUMN(2:2)),ROW(1:4)),COLUMN(2:2),2:2))/4

Make sure you have atleast 4 average cells ..The formula picks up values of
the last 4 cells in Row 2 the corresponding cells in Row1 contains the text
'Average'

--
Jacob


"Kevin Smith" wrote:

Hello,

I am trying to produce a formula that will give the last 4 weeks average
from a Row that contains the daily figures followed by the weely averages i.e
A B C D E F G H I J K

1 Sun Mon Tue Wed Thu Fri Sat Average Sun Mon Tue etc etc
2 5 4 5 4 5 4 5 4.5714 5 5 4
etc etc

The weekly average is setup so if there is no data then it returns "". What
i am doing is finding the last active cell on the column and then using that
to set the cell range for the sum and count to produce the averages.

This is a snippet of the formula that i am using


=SUM(INDIRECT(ADDRESS(ROW(),MATCH(LOOKUP(100^100,$ A10:$FO10),$A10:$FO10,FALSE))):INDIRECT(ADDRESS(RO W(),MATCH(LOOKUP(100^100,$A10:$FO10),$A10:$FO10,FA LSE))))

The problem that i have is... the lookup runs right to left but the match
runs left to right. Therefore the lookup finds the value of the last cell
which should be the average of the current week but then if there is another
instance of the lookup value on the same row then the Match stops at that
cell.

is there a way to get Match to run Right to Left in line with the lookup or
is there an easier way to do what i am attempting?

Please HELP!!!!
--
Kevin Smith :o)

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Sum(indirect(Address......

Thank you for your assistance that is spot on.
--
Kevin Smith :o)


"Jacob Skaria" wrote:

OR..
=AVERAGE(LOOKUP(LARGE(IF((ISNUMBER(2:2)*(1:1="Aver age")),
COLUMN(2:2)),ROW(1:4)),COLUMN(2:2),2:2))

--
Jacob


"Jacob Skaria" wrote:

Try the below

Array entered (Apply formul using Ctrl+Shift+Enter instead of just Enter)
=SUM(LOOKUP(LARGE(IF((ISNUMBER(2:2)*(1:1="Average" )),COLUMN(2:2)),ROW(1:4)),COLUMN(2:2),2:2))/4

Make sure you have atleast 4 average cells ..The formula picks up values of
the last 4 cells in Row 2 the corresponding cells in Row1 contains the text
'Average'

--
Jacob


"Kevin Smith" wrote:

Hello,

I am trying to produce a formula that will give the last 4 weeks average
from a Row that contains the daily figures followed by the weely averages i.e
A B C D E F G H I J K

1 Sun Mon Tue Wed Thu Fri Sat Average Sun Mon Tue etc etc
2 5 4 5 4 5 4 5 4.5714 5 5 4
etc etc

The weekly average is setup so if there is no data then it returns "". What
i am doing is finding the last active cell on the column and then using that
to set the cell range for the sum and count to produce the averages.

This is a snippet of the formula that i am using


=SUM(INDIRECT(ADDRESS(ROW(),MATCH(LOOKUP(100^100,$ A10:$FO10),$A10:$FO10,FALSE))):INDIRECT(ADDRESS(RO W(),MATCH(LOOKUP(100^100,$A10:$FO10),$A10:$FO10,FA LSE))))

The problem that i have is... the lookup runs right to left but the match
runs left to right. Therefore the lookup finds the value of the last cell
which should be the average of the current week but then if there is another
instance of the lookup value on the same row then the Match stops at that
cell.

is there a way to get Match to run Right to Left in line with the lookup or
is there an easier way to do what i am attempting?

Please HELP!!!!
--
Kevin Smith :o)

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
Allow EXCEL INDIRECT(ADDRESS()) and INDIRECT(RANGE()) functions Mike Barlow Excel Worksheet Functions 7 May 21st 23 07:42 PM
Indirect address stew Excel Discussion (Misc queries) 4 July 20th 09 04:50 PM
INDIRECT and ADDRESS Al Excel Worksheet Functions 4 March 13th 09 10:05 PM
using INDIRECT(ADDRESS(...)) Dave F[_2_] Excel Discussion (Misc queries) 4 January 3rd 08 07:55 PM
Indirect(Address(... Adam1 Chicago Excel Discussion (Misc queries) 1 November 6th 07 05:52 PM


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