#1   Report Post  
Posted to microsoft.public.excel.misc
Kim Kim is offline
external usenet poster
 
Posts: 284
Default Help with formulas

I have this formulas
=SUMPRODUCT(($C$3:$C$340=C3)*($F$3:$F$340=F3)*(Q3 $Q$3:$Q$340))+1

Is there a way where I can replace $C$340 with something that it will look
at the last row. I know it can be done with a macro $C$" & lngRow & " but I
want to avoid that.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Help with formulas

Hi Kim

Create some Dynamic named ranges
InsertNameDefine
Name ColC ( or Sales or whatever it contains)
Refers to =$C$3:INDEX($C:$C,COUNTA($C:$C))

Repeat process for other columns then use
=SUMPRODUCT((ColC=C3)*(ColF=F3)*(Q3ColQ))+1

For more information on creating named ranges take a look at
http://www.contextures.com/xlNames03.html

--
Regards
Roger Govier

"Kim" wrote in message
...
I have this formulas
=SUMPRODUCT(($C$3:$C$340=C3)*($F$3:$F$340=F3)*(Q3 $Q$3:$Q$340))+1

Is there a way where I can replace $C$340 with something that it will look
at the last row. I know it can be done with a macro $C$" & lngRow & " but
I
want to avoid that.

Thanks.

__________ Information from ESET Smart Security, version of virus
signature database 4531 (20091022) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 4532 (20091022) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Help with formulas

Ki,

Try this. You can get it all in one formula but it gets a bit long so I
split it into 2.

Put this in (Say) A1 which returns the last used row in the range C1:C1000
=SUMPRODUCT(MAX((ROW(C1:C1000))*(C1:C1000<"")))

Now modify your formula like this
=SUMPRODUCT((INDIRECT("$C$3:$C" & A1)=C3)*(INDIRECT("$F$3:$F" &
A1)=F3)*(Q3INDIRECT("$Q$3:$Q" &A1)))+1

If you want it all in one formula.

=SUMPRODUCT((INDIRECT("$C$3:$C" &
SUMPRODUCT(MAX((ROW(C1:C1000))*(C1:C1000<""))))=C 3)*(INDIRECT("$F$3:$F" &
SUMPRODUCT(MAX((ROW(C1:C1000))*(C1:C1000<""))))=F 3)*(Q3INDIRECT("$Q$3:$Q"
&SUMPRODUCT(MAX((ROW(C1:C1000))*(C1:C1000<""))))) )+1

As i said a bit long!!

Mike

"Kim" wrote:

I have this formulas
=SUMPRODUCT(($C$3:$C$340=C3)*($F$3:$F$340=F3)*(Q3 $Q$3:$Q$340))+1

Is there a way where I can replace $C$340 with something that it will look
at the last row. I know it can be done with a macro $C$" & lngRow & " but I
want to avoid that.

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
Counting # of Formulas in a column with formulas and entered data Brand Excel Worksheet Functions 1 October 10th 09 01:01 PM
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP Sherberg Excel Worksheet Functions 4 September 11th 07 01:34 AM
automatically copy formulas down columns or copy formulas all the HowlingBlue Excel Worksheet Functions 1 March 16th 07 11:11 PM
Formulas not evaluated, Formulas treated as strings Bob Sullentrup Excel Discussion (Misc queries) 0 November 27th 06 08:01 PM
formulas for changing formulas? creativeops Excel Discussion (Misc queries) 4 January 26th 06 03:07 AM


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