Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default change the number of rows to a variable


Now, the number of rows in 'Data' sheet is 3938, so the function is:
=SUMPRODUCT((Data!G2:G3938=7100)*(Data!B2:B3938=10 00)*(Data!O2:O3938=2)*(Data!C2:C3938)


If I don't know the number of rows is 3938, what should I do t
accomplish the same function

--
minrufen
-----------------------------------------------------------------------
minrufeng's Profile: http://www.excelforum.com/member.php...fo&userid=2620
View this thread: http://www.excelforum.com/showthread.php?threadid=39592

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default change the number of rows to a variable


Use:
ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastC ell).Row

This returns the number of the last used row in a worksheet


--
Raman325
------------------------------------------------------------------------
Raman325's Profile: http://www.excelforum.com/member.php...o&userid=24748
View this thread: http://www.excelforum.com/showthread...hreadid=395920

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default change the number of rows to a variable


How to combine this into the sumproduct function in the original post?
Thanks for your help.

Raman325 Wrote:
Use:
ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastC ell).Row

This returns the number of the last used row in a worksheet



--
minrufeng
------------------------------------------------------------------------
minrufeng's Profile: http://www.excelforum.com/member.php...o&userid=26208
View this thread: http://www.excelforum.com/showthread...hreadid=395920

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
Summing a variable number of rows CEGavinMcGrath Excel Discussion (Misc queries) 4 August 28th 08 10:03 PM
copy down with variable number of rows mohavv Excel Discussion (Misc queries) 5 November 15th 07 04:18 PM
change the number of rows to a variable theguz[_4_] Excel Programming 0 August 15th 05 09:55 PM
Paste to variable number of rows Doug Glancy Excel Programming 0 April 1st 04 01:09 AM
deleting variable number of rows Nick Excel Programming 1 October 29th 03 04:31 PM


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