View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
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.