Hi All,
I need some help figuring this out. I have data that looks like this in the worksheet:
Column 1 Column 2
aaa xxx
bbb xxx
ccc xxx
ddd xxx
eee xxx
aaa yyy
bbb yyy
ccc yyy
ddd yyy
eee yyy
...
Please note that the number of times this patten repeats is variable and is generated dynamically just before I am attempting to make the calculation below.
Here is what I need to do:
I need to find the range that contains xxx in column 2. Then, within that range I need to find the row that contains "bbb" and get the value from column 3.
Then I need to find the row that contains ccc and put the value in column 3 = bbb row value * 0.746.
Then I need to repeat this for yyy and so on.
I have kind of pseudo-coded this out, but it is not working, I think because I am missing some of the finer points of finding within a range and have not found much by googling.
A couple notes about the code:
- I have an array NameArray that contains xxx, yyy, etc.
- Please see the comment that indicates where it is currently erroring and what the message is.
Here is my code:
Any help will be greatly appreciated.
Thanks,
brl8
Bookmarks