Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Sumproduct with calculated column

Hi

I am trying to use the following formula in the worksheet 'Reports':

=SUMPRODUCT((Operations!B3:B2312(--("2005/12/31")))*(Operations!L3:L2312))

but,

the values in Operations!L3:L2312 are actually just filldown
calculations:

=VLOOKUP(G2202,'RVU Lookup'!A901:B8111,2,FALSE)

and therefore the sumproduct doesn't work. I could copy the L column,
paste special the values, run the sumproduct, and it should work:

- isn't there a way to do this with VBA or at least an easier automated
solution?

thanks in advance

CLS

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Sumproduct with calculated column

Hi Charles,

Your initial approach should work. It doesn't matter that the values
in column L are returned by a formula. Does the SUMPRODUCT return an
error or just give you the wrong answer?

I see that you are using a relative reference in your VLOOKUP. This
may be how you want it but it has caught me out in the past

Rgds,
Andrew


Charles L. Snyder wrote:
Hi

I am trying to use the following formula in the worksheet 'Reports':

=SUMPRODUCT((Operations!B3:B2312(--("2005/12/31")))*(Operations!L3:L2312))

but,

the values in Operations!L3:L2312 are actually just filldown
calculations:

=VLOOKUP(G2202,'RVU Lookup'!A901:B8111,2,FALSE)

and therefore the sumproduct doesn't work. I could copy the L column,
paste special the values, run the sumproduct, and it should work:

- isn't there a way to do this with VBA or at least an easier automated
solution?

thanks in advance

CLS


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Sumproduct with calculated column

I just grabbed a copy of the VLOOKUP formula from one of the cells to
put in my post - hence therelative VLOOKUP reference.

Perhaps the problem is that a few of the cells in column L (the
calculated column) have a value of #N/A, since the calculation formula
found an empty lookup for that value?

Thanks

Charles

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Sumproduct with calculated column

You could get around this by replacing the lookup function with:
=IF(ISNA(VLOOKUP(G2202,'RVU
Lookup'!A901:B8111,2,FALSE)),0,VLOOKUP(G2202,'RVU
Lookup'!A901:B8111,2,FALSE))

This will now return 0 if the value is not found instead of #N/A
(assuming that is acceptable in your table)

Andrew

  #5   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Sumproduct with calculated column

One possible solution to exclude the error values:

=SUMPRODUCT((Operations!B3:B2312(--("2005/12/31")))*(IF(ISNUMBER(Operations!L3:L2312),Operation s!L3:L2312,0)))

Enter with Control+Shift+Enter.

"Charles L. Snyder" wrote:

I just grabbed a copy of the VLOOKUP formula from one of the cells to
put in my post - hence therelative VLOOKUP reference.

Perhaps the problem is that a few of the cells in column L (the
calculated column) have a value of #N/A, since the calculation formula
found an empty lookup for that value?

Thanks

Charles




  #6   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Sumproduct with calculated column

You could also use an IF statement w/Vlookup to return a 0 instead of an error:

=IF(ISNA(VLOOKUP(G2202,'RVU
Lookup'!A901:B8111,2,FALSE)),0,VLOOKUP(G2202,'RVU Lookup'!A901:B8111,2,FALSE))

Then you would not have to modify your SUMPRODUCT function.


"Charles L. Snyder" wrote:

I just grabbed a copy of the VLOOKUP formula from one of the cells to
put in my post - hence therelative VLOOKUP reference.

Perhaps the problem is that a few of the cells in column L (the
calculated column) have a value of #N/A, since the calculation formula
found an empty lookup for that value?

Thanks

Charles


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Sumproduct with calculated column

On 2006-01-24 23:54:02 -0600, JMB said:

You could also use an IF statement w/Vlookup to return a 0 instead of an error:

=IF(ISNA(VLOOKUP(G2202,'RVU
Lookup'!A901:B8111,2,FALSE)),0,VLOOKUP(G2202,'RVU
Lookup'!A901:B8111,2,FALSE))

Then you would not have to modify your SUMPRODUCT function.


"Charles L. Snyder" wrote:

I just grabbed a copy of the VLOOKUP formula from one of the cells to
put in my post - hence therelative VLOOKUP reference.

Perhaps the problem is that a few of the cells in column L (the
calculated column) have a value of #N/A, since the calculation formula
found an empty lookup for that value?

Thanks

Charles


Thanks for the help - it works perfectly now !
CLS

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
Pivot table calculated column CindyHoskey Excel Discussion (Misc queries) 1 May 9th 09 04:56 PM
Increasing the number calculated by for same column Nic Excel Discussion (Misc queries) 5 March 13th 07 03:20 PM
excel trying to sum a column of calculated values Rowdy Excel Discussion (Misc queries) 4 January 26th 06 10:50 AM
Can the sum of 1p + 3p be calculated in a column in Excel? WW Excel Discussion (Misc queries) 1 November 10th 05 08:47 AM
using a calculated column value within a range gvm Excel Programming 1 September 17th 05 02:02 PM


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

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

About Us

"It's about Microsoft Excel"