LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Sam via OfficeKB.com
 
Posts: n/a
Default Return Consecutive Values

Hi All,

I am using the formula below to return one specific value referenced in an
input cell B1:

=IF((COUNTIF(INDEX(Stock,ROW()-ROW(Stock)+1,0),B$1))=1,B$1,"")

How might a more suitable formula or the above formula be expanded to find
pairs of consecutive values in ascending order in a Dynamic Defined Range
“Stock” ( 7 Columns B-H and many Rows), and return the two consecutive
values on the same Row in separate columns (side by side) on a new sheet.

Sample Data – Defined Dynamic Range “Stock”:
COL B C D E F G H
ROW19 70 72 87 88 89 92 95
ROW20 73 74 78 80 81 83 84

In case data is misaligned: Row 19, Column B, C, D, E, F, G, and H houses
70, 72, 87, 88, 89, 92 and 95 respectively. Row 20, Column C, D, E, F, G,
and H houses 73 74, 78, 80, 81, 83 and 84 respectively.

New Worksheet (for Expected Results)
ROW1 Input cells: B$1, C$1, D$1, E$1, F$1, G$1, H$1, I$1, J$1, K$1
80 81 82 83 84 85 86 87 88 89

In case data is misaligned: cell B1, C1, D1, E1, F1, G1, H1, I1, J1 and K1
house 80, 81, 82, 83, 84, 85, 86, 87, 88 and 89

Expected Results:
COL B C D E F G H I J K
ROW19 88 89
ROW20 83 84

Row19 – 88 and 89 returned in columns J and K
Row20 – 83 and 84 returned in columns E and F

Kind Regards,
Sam

--
Message posted via http://www.officekb.com
 
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
How to use SUMIF to return sums between two values located in cells ScottBerger Excel Worksheet Functions 2 April 23rd 23 09:05 PM
Using a Vlookup to return values in a data list? rtjeter Excel Worksheet Functions 2 April 26th 05 05:56 AM
How to use an array or matrix to return text vs. numeric values Ingrid Excel Worksheet Functions 2 April 10th 05 12:51 AM
show a set of diagonal values in a matrix as a set of consecutive. Kelvin Excel Worksheet Functions 1 March 8th 05 12:26 PM
Hlookup to return a sum of values Abe Excel Worksheet Functions 3 February 13th 05 08:40 PM


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