ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Returning Cell Refrences/range Refrences (https://www.excelbanter.com/excel-programming/293625-returning-cell-refrences-range-refrences.html)

ksnapp[_36_]

Returning Cell Refrences/range Refrences
 
I need a sub that searches a column and finds the first cell that say
"PORK", then it has to search fruther down and find the second instanc
of "PORK" and give some form of cell refrence/ range reference that
can plug into a furmula. (I can write that part, I hope). Then I nee
it to do the same thing for each successive instance of "PORK." Eac
time it says pork im gonna run different formulas in 3 or 4 cells t
the right using the range that the sub returns.

Is this possible

--
Message posted from http://www.ExcelForum.com


Frank Kabel

Returning Cell Refrences/range Refrences
 
Hi
you may explain this with some more detail :-)
- where do you want this result to be stored (as this could return
multiple values - on for each 'Pork')
- you may tell us in what kind of formula you want to use the results
- even better: Try Explaining what you're trying to achieve with some
sample data (plain text, no attachments please)

--
Regards
Frank Kabel
Frankfurt, Germany

I need a sub that searches a column and finds the first cell that

says
"PORK", then it has to search fruther down and find the second
instance of "PORK" and give some form of cell refrence/ range
reference that I can plug into a furmula. (I can write that part, I
hope). Then I need it to do the same thing for each successive
instance of "PORK." Each time it says pork im gonna run different
formulas in 3 or 4 cells to the right using the range that the sub
returns.

Is this possible?


---
Message posted from http://www.ExcelForum.com/



Alan Beban[_4_]

Returning Cell Refrences/range Refrences
 
If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook, and
assuming your data is in a range named "dataRange", the following, array
entered into a vertical range sufficiently large to accommodate the
occurrences of "PORK", will return a vertical column of the cell
addresses of all occurrences:

=ArrayMatch("PORK",dataRange,"A")

Alan Beban

ksnapp < wrote:
I need a sub that searches a column and finds the first cell that says
"PORK", then it has to search fruther down and find the second instance
of "PORK" and give some form of cell refrence/ range reference that I
can plug into a furmula. (I can write that part, I hope). Then I need
it to do the same thing for each successive instance of "PORK." Each
time it says pork im gonna run different formulas in 3 or 4 cells to
the right using the range that the sub returns.

Is this possible?


---
Message posted from http://www.ExcelForum.com/




All times are GMT +1. The time now is 01:54 AM.

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