LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Morrigan
 
Posts: n/a
Default


I am not very good in explaining, but I will try.

In the sample that I gave you, I had:

INDEX('Stock Req 13 BarCodes'!$A$1:$W$999,SUMPRODUCT(SMALL(ROW('Stock
Req 13 BarCodes'!$10:$999)*('Stock Req 13
BarCodes'!$V$10:$V$999<""),ROW()-8+COUNTA('Stock Req 13
BarCodes'!$V$10:$V$999)-COUNTIF('Stock Req 13
BarCodes'!$V$10:$V$999,"0"))),COLUMN()-1)

SUMPRODUCT() will generate an array that contains 990 values:
{0 0 0 0...0 0 0 10 11 12 13 14 15 25 30}

As you can tell, SUMPRODUCT() returns all the row numbers where 'Stock
Req 13 BarCodes'!V10:V999 not equal "". In your case it will return
all the row numbers where V10:V999 are numbers. At position 983, we
have a value of 10 which is the row number that a number first appears
in V10:V999. Position 984 contains the next and so on.

Here I used SMALL() to output these values. It looks something like:

SMALL({0 0 0 0...0 0 0 10 11 12 13 14 15 25 30},ROW()-8+COUNTA('Stock
Req 13 BarCodes'!$V$10:$V$999)-COUNTIF('Stock Req 13
BarCodes'!$V$10:$V$999,"0"))

COUNTA() will return 990 which is your total array length.
COUNTIF() will return a number(8 in this case) which is number of
values that are greater than 0.

Therefore COUNTA()-COUNTIF() will always point at the position of the
last 0 in the array. However what you want is everything that comes
after that. Since the first line in your sheet SHORT-1 is row 9, using
ROW()-8 will generate 1,2,3,4,etc as you drag the formula down.

Now everything is simple, the functions above return a row number which
is used in INDEX():

INDEX(range, row number from above functions, column number)


Hope that helps.


--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=398757



 
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
import data to specific columns marlea Excel Discussion (Misc queries) 1 August 12th 05 02:05 AM
Choose data from a particular column based on a specific value markx Excel Worksheet Functions 1 July 15th 05 06:55 PM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
Extract specific data into its own workbook via macro? Adrian B Excel Discussion (Misc queries) 2 February 24th 05 06:09 AM
Help with data not getting plotted Scott Ehrlich Charts and Charting in Excel 1 January 23rd 05 05:15 PM


All times are GMT +1. The time now is 11:02 AM.

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"