Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David
 
Posts: n/a
Default large / sumproduct combo

I have a table with 4 columns as below:

Date Portfolio units price value
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0.4270 $11.71 $5.00
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0 0 0
05/03/05 Growth 0 0 0
05/03/05 Growth 0.4125 $12.12 $5.00
05/03/05 Growth 0 0 0
05/03/05 Growth 0 0 0
05/03/05 Growth 0 0 0

The table continues and includes cases where there is more than one listing
for a given portfolio(say, "Balanced") within a given month - but on
different dates.
I'd like to write a formula that says, "Give me the most recent price for
the "X" portfolio in the Month of "Y". I can look up the total of all values
in the price column for the balanced portfolio(or a count thereof) with
sumproduct, but I need to combine it with the large function(maybe?) in a way
that gives me the closest date to the given date.

The intent here is to establish a value of a portfolio as of the end of any
given month, so I would need the most recent value(that is less than the
month end I'm looking for) for that portfolio in order to value. it.

Hopefully I explained this in enough detail, but if there are any questions,
please dont hesitate to ask.


tia,
Dave
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default large / sumproduct combo

One way

=MAX(IF((MONTH(A2:A30)=1)*(B2:B30="Balanced")*(A2: A30),C2:C30))

entered with ctrl + shift & enter

where price is in C2:C30, the above will work for January, you can add year
as well
if needed

--
Regards,

Peo Sjoblom

(No private emails please)


"David" wrote in message
...
I have a table with 4 columns as below:

Date Portfolio units price value
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0.4270 $11.71 $5.00
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0 0 0
05/03/05 Growth 0 0 0
05/03/05 Growth 0.4125 $12.12 $5.00
05/03/05 Growth 0 0 0
05/03/05 Growth 0 0 0
05/03/05 Growth 0 0 0

The table continues and includes cases where there is more than one
listing
for a given portfolio(say, "Balanced") within a given month - but on
different dates.
I'd like to write a formula that says, "Give me the most recent price for
the "X" portfolio in the Month of "Y". I can look up the total of all
values
in the price column for the balanced portfolio(or a count thereof) with
sumproduct, but I need to combine it with the large function(maybe?) in a
way
that gives me the closest date to the given date.

The intent here is to establish a value of a portfolio as of the end of
any
given month, so I would need the most recent value(that is less than the
month end I'm looking for) for that portfolio in order to value. it.

Hopefully I explained this in enough detail, but if there are any
questions,
please dont hesitate to ask.


tia,
Dave


  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default large / sumproduct combo

I think Peo's formula gives you the maximum amount for the month and
portfolio in question, not the latest. So if the value were 147 on the 11th
and 145 on the 12th, it returns 147 not 145. A small tweak should sort it

=INDEX(C2:C30,MATCH(MAX(IF((MONTH(A2:A30)=5)*(B2:B 30="Balanced"),A2:A30)),A2
:A30,0))

still as an array formula

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Peo Sjoblom" wrote in message
...
One way

=MAX(IF((MONTH(A2:A30)=1)*(B2:B30="Balanced")*(A2: A30),C2:C30))

entered with ctrl + shift & enter

where price is in C2:C30, the above will work for January, you can add

year
as well
if needed

--
Regards,

Peo Sjoblom

(No private emails please)


"David" wrote in message
...
I have a table with 4 columns as below:

Date Portfolio units price value
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0.4270 $11.71 $5.00
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0 0 0
05/03/05 Growth 0 0 0
05/03/05 Growth 0.4125 $12.12 $5.00
05/03/05 Growth 0 0 0
05/03/05 Growth 0 0 0
05/03/05 Growth 0 0 0

The table continues and includes cases where there is more than one
listing
for a given portfolio(say, "Balanced") within a given month - but on
different dates.
I'd like to write a formula that says, "Give me the most recent price

for
the "X" portfolio in the Month of "Y". I can look up the total of all
values
in the price column for the balanced portfolio(or a count thereof) with
sumproduct, but I need to combine it with the large function(maybe?) in

a
way
that gives me the closest date to the given date.

The intent here is to establish a value of a portfolio as of the end of
any
given month, so I would need the most recent value(that is less than the
month end I'm looking for) for that portfolio in order to value. it.

Hopefully I explained this in enough detail, but if there are any
questions,
please dont hesitate to ask.


tia,
Dave




  #4   Report Post  
Dave Breitenbach
 
Posts: n/a
Default large / sumproduct combo

Thanks to both for the effort. I'm using Bob's adjusted formula and it works
perfectly.

"Bob Phillips" wrote:

I think Peo's formula gives you the maximum amount for the month and
portfolio in question, not the latest. So if the value were 147 on the 11th
and 145 on the 12th, it returns 147 not 145. A small tweak should sort it

=INDEX(C2:C30,MATCH(MAX(IF((MONTH(A2:A30)=5)*(B2:B 30="Balanced"),A2:A30)),A2
:A30,0))

still as an array formula

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Peo Sjoblom" wrote in message
...
One way

=MAX(IF((MONTH(A2:A30)=1)*(B2:B30="Balanced")*(A2: A30),C2:C30))

entered with ctrl + shift & enter

where price is in C2:C30, the above will work for January, you can add

year
as well
if needed

--
Regards,

Peo Sjoblom

(No private emails please)


"David" wrote in message
...
I have a table with 4 columns as below:

Date Portfolio units price value
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0.4270 $11.71 $5.00
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0 0 0
05/03/05 Balanced 0 0 0
05/03/05 Growth 0 0 0
05/03/05 Growth 0.4125 $12.12 $5.00
05/03/05 Growth 0 0 0
05/03/05 Growth 0 0 0
05/03/05 Growth 0 0 0

The table continues and includes cases where there is more than one
listing
for a given portfolio(say, "Balanced") within a given month - but on
different dates.
I'd like to write a formula that says, "Give me the most recent price

for
the "X" portfolio in the Month of "Y". I can look up the total of all
values
in the price column for the balanced portfolio(or a count thereof) with
sumproduct, but I need to combine it with the large function(maybe?) in

a
way
that gives me the closest date to the given date.

The intent here is to establish a value of a portfolio as of the end of
any
given month, so I would need the most recent value(that is less than the
month end I'm looking for) for that portfolio in order to value. it.

Hopefully I explained this in enough detail, but if there are any
questions,
please dont hesitate to ask.


tia,
Dave





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
Nesting Combo Boxes /Returning an Array ELMONDO SNITHER Excel Discussion (Misc queries) 1 June 30th 05 01:15 AM
Dynamic Combo Box benjarfer Excel Worksheet Functions 2 April 8th 05 02:17 PM
connecting combo boxes to yield data in another cell. TxN8tv Excel Discussion (Misc queries) 0 March 14th 05 04:07 PM
dynamic combo boxes tjb Excel Worksheet Functions 2 January 25th 05 07:33 PM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


All times are GMT +1. The time now is 04:13 AM.

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"