ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A count function or macro needed (https://www.excelbanter.com/excel-programming/282645-count-function-macro-needed.html)

dkenebre

A count function or macro needed
 

I now need a function that will count back all previous orange and blu
rows for the farthest digit back in the R, S and T cells and place i
in the N column. See sample below the yellow N column have the correc
answers:

Example:
.................R..S...T........N
row 11:....9...0...6
row 12:....7...5...7
row 13:....7...3...4
row 14:....4...0...9.......3
row 15:....0...5...6.......4

on row 14 the 0 and 9 are equally the farthest digits back,
at 3 rows.
on row 15 the 6 is the farthest digit back at 4 rows.

I would appreciate your help

+----------------------------------------------------------------
| Attachment filename: book1b.xls
|Download attachment: http://www.excelforum.com/attachment.php?postid=359749
+----------------------------------------------------------------

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


Edwin Tam (MS MVP)

A count function or macro needed
 
I cannot understand your question. What color? And what is "farthest digit back"


dkenebre[_2_]

A count function or macro needed
 

The color is in the sample document, but I have reworded my request. Le
me know if you need further information:
The furthest digit back: each of the 3 cells being evaluated (R S an
T) have single digit values which have occurred in previous R, S
cells, but the value which last appeared in the earliest row is th
value which the furthest back. I want the function to count how man
rows since the last time that value last occurred.


I now need a function that will count back all previous rows for th
farthest digit back in the R, S and T cells and place it in the
column. See sample below the N column has the correct answers:

Example:
.................R..S...T........N
row 11:....9...0...6
row 12:....7...5...7
row 13:....7...3...4
row 14:....4...0...9........3
row 15:....0...5...6........4

on row 14 the 0 and 9 are equally the farthest digits back,
at 3 rows.
on row 15 the 6 is the farthest digit back at 4 rows.

I would appreciate your help

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com



All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com