cell.address / variable with cell.find

vbaNewby

Board Regular
Joined
Jan 26, 2011
Messages
138
Hi guru's!

I have an array where I get the first element of the array and I want to use the that string to first lookup that string and then use that to find my next string but start the find after the address of the first found string:

Code:
 If InStr(myCell, ":") Then
            MyArray = Split(myCell, ":")
            arr = MyArray(UBound(MyArray))
            myCell = arr
            subAcct = True
            arrDown = MyArray(LBound(MyArray))
         End If

Set FoundSub = Cells.Find(what:=arrDown, After:=ActiveCell, LookIn:=xlFormulas _
                , LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
                MatchCase:=False, SearchFormat:=True)
                
                Set FoundCell = Cells.Find(what:=myCell,[U][B] After:=FoundSub[/B][/U], LookIn:=xlFormulas _
                , LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
                MatchCase:=False, SearchFormat:=True)

The problem is with the After:= argument. I've tried FoundSub.address, that does not work either.

So I'm trying to tell the macro to start my find after FoundSub.address, how can I accomplish this???

Thanks in advance.
 
So in one worksheet you have this?

<TABLE style="WIDTH: 91pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=121><COLGROUP><COL style="WIDTH: 91pt; mso-width-source: userset; mso-width-alt: 4425" width=121><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 91pt; HEIGHT: 15pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-RIGHT: windowtext 0.5pt solid" class=xl63 height=20 width=121>hello:world:one

</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl63 height=20>hello:world:two</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl63 height=20>hello:world:three</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl63 height=20>test:again:test2</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl64 height=20>test:again:test3

</TD></TR></TBODY></TABLE>
The values separated by colons are what you want search for in a worksheet with data like this:

<TABLE style="WIDTH: 96pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=128><COLGROUP><COL style="WIDTH: 48pt" span=2 width=64><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 48pt; HEIGHT: 15pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-RIGHT: windowtext 0.5pt solid" class=xl65 height=20 width=64>hello

</TD><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; WIDTH: 48pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-RIGHT: windowtext 0.5pt solid" id=td_post_2672996 class=xl65 width=64>test

</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl65 height=20>world</TD><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl65>again</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl65 height=20>one</TD><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl65>test2</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl65 height=20>two</TD><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl66>test3

</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class=xl65 height=20>three

</TD><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" id=td_post_2672996 class=xl67> </TD></TR></TBODY></TABLE>
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
So in one worksheet you have this?

<table style="WIDTH: 91pt; BORDER-COLLAPSE: collapse" border="0" cellpadding="0" cellspacing="0" width="121"><colgroup><col style="WIDTH: 91pt; mso-width-source: userset; mso-width-alt: 4425" width="121"></colgroup><tbody><tr style="HEIGHT: 15pt" height="20"><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 91pt; HEIGHT: 15pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-RIGHT: windowtext 0.5pt solid" class="xl63" height="20" width="121">hello:world:one

</td></tr><tr style="HEIGHT: 15pt" height="20"><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl63" height="20">hello:world:two</td></tr><tr style="HEIGHT: 15pt" height="20"><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl63" height="20">hello:world:three</td></tr><tr style="HEIGHT: 15pt" height="20"><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl63" height="20">test:again:test2</td></tr><tr style="HEIGHT: 15pt" height="20"><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl64" height="20">test:again:test3

</td></tr></tbody></table>
The values separated by colons are what you want search for in a worksheet with data like this:

<table style="WIDTH: 96pt; BORDER-COLLAPSE: collapse" border="0" cellpadding="0" cellspacing="0" width="128"><colgroup><col style="WIDTH: 48pt" span="2" width="64"></colgroup><tbody><tr style="HEIGHT: 15pt" height="20"><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 48pt; HEIGHT: 15pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-RIGHT: windowtext 0.5pt solid" class="xl65" height="20" width="64">hello

</td><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; WIDTH: 48pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-RIGHT: windowtext 0.5pt solid" id="td_post_2672996" class="xl65" width="64">test

</td></tr><tr style="HEIGHT: 15pt" height="20"><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl65" height="20">world</td><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl65">again</td></tr><tr style="HEIGHT: 15pt" height="20"><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl65" height="20">one</td><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl65">test2</td></tr><tr style="HEIGHT: 15pt" height="20"><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl65" height="20">two</td><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl66">test3

</td></tr><tr style="HEIGHT: 15pt" height="20"><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" class="xl65" height="20">three

</td><td style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; BORDER-TOP: windowtext; BORDER-RIGHT: windowtext 0.5pt solid" id="td_post_2672996" class="xl67">
</td></tr></tbody></table>
Yes, except the search sheet looks like this:

<table border="0" cellpadding="0" cellspacing="0" width="216"><col style="width:54pt" span="3" width="72"> <tbody><tr style="height:15.75pt" height="21"> <td style="height:15.75pt;width:54pt" height="21" width="72">hello</td> <td style="width:54pt" width="72">
</td> <td style="width:54pt" width="72">
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>world</td> <td>
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>one</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>two</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>three</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">test</td> <td>
</td> <td>
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>again</td> <td>
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>test2</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>test3</td> </tr> </tbody></table>
 
Upvote 0
So you have a hierachy of data?

What are you looking for first the parent(s) or the children?

eg are you going to search for hello, then world, then one,two,three

Or is it the other way round, children first.
 
Upvote 0
So you have a hierachy of data?

What are you looking for first the parent(s) or the children?

eg are you going to search for hello, then world, then one,two,three

Or is it the other way round, children first.
I am looking for the parent first. The middle accounts do not matter. So I first find hello (works just fine) and then I want to find the child. One two three.

The problem is (i'm sure you already know just want to be sure) is if I have something like this:

<table border="0" cellpadding="0" cellspacing="0" width="216"><tbody><tr style="height:15.75pt" height="21"><td style="height:15.75pt;width:54pt" height="21" width="72">hello</td> <td style="width:54pt" width="72">
</td> <td style="width:54pt" width="72">
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>world</td> <td>
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>one</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>two</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>three</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">test</td> <td>
</td> <td>
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>again</td> <td>
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>test2</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>test3</td></tr></tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="216"><tbody><tr style="height:15.75pt" height="21"><td style="height:15.75pt;width:54pt" height="21" width="72">helloThere</td> <td style="width:54pt" width="72">
</td> <td style="width:54pt" width="72">
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>world</td> <td>
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>one</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>two</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>three</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">testThere</td> <td>
</td> <td>
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>again</td> <td>
</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>test2</td> </tr> <tr style="height:15.75pt" height="21"> <td style="height:15.75pt" height="21">
</td> <td>
</td> <td>test3</td></tr></tbody></table>


If my string is "helloThere:world:one" using a regular find is going to still return the first hello (hello:world:one)

So that is why I am rather confused about why the after argument is not working as intended using cells.find
 
Upvote 0
Surely if you look for 'helloThere' then 'hello' isn't going to be found.

Or are those just very simple examples and you might not be have the exact terms to look for?

Also, can the middle term definitely be ignored?

What if you have 'hello:world:one' and 'hello:somethingelse:one'?

Sorry for all the questions but I'm just trying to establish what you have.

I've actually got an idea that might work but uses a slightly different approach.
 
Upvote 0
Surely if you look for 'helloThere' then 'hello' isn't going to be found.

Or are those just very simple examples and you might not be have the exact terms to look for?

Also, can the middle term definitely be ignored?

What if you have 'hello:world:one' and 'hello:somethingelse:one'?

Sorry for all the questions but I'm just trying to establish what you have.

I've actually got an idea that might work but uses a slightly different approach.

My mistake "If my string is "helloThere:world:one" using a regular find is going to still return the first helloThere (hello:world:one)"

Middle term can be ignored but there could also be a string as follows: "HelloWorld:One:Two:Three:Four:Five"

The first and the last words are what is important to me ie "HelloWorld" and "Five"

"What if you have 'hello:world:one' and 'hello:somethingelse:one'?"

This will not happen.

Let me know your approach! I'm up for trying anything at this point. Again, thanks for all the time and effort.
 
Upvote 0
Sorry for another question but how could you return 'hello' if you were searching for 'helloThere'?
 
Upvote 0
Sorry for another question but how could you return 'hello' if you were searching for 'helloThere'?
No problem Norie, the more explanation the better for a solution.

Example:

String is "helloThere:world:one"

My other worksheet looks like this:

<table border="0" cellpadding="0" cellspacing="0" width="216"><tbody><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt; width: 54pt;" height="21" width="72">hello</td> <td style="width: 54pt;" width="72">
</td> <td style="width: 54pt;" width="72">
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>world</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>one</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>two</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>three</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">test</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>again</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test2</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test3</td></tr></tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="216"><tbody><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt; width: 54pt;" height="21" width="72">helloThere</td> <td style="width: 54pt;" width="72">
</td> <td style="width: 54pt;" width="72">
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>world</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>one</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>two</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>three</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">testThere</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>again</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test2</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test3</td></tr></tbody></table>

I first want to find "helloThere" and use another find to find "one". This is the code I pasted in the original post. Currently when finding "one" I am finding the "one" above the intended find or string "Hello:world:one"

Its always finding the first instance of "one" and not the cell under the parent account of "helloThere"

Its a simple little algo that should work but for some reason the After argument in the cells.find function is not starting the search after my parent account.

Clarified?

EDIT: Norie, can't I just use the child address of the cell, offset the row by one and use my find function with After:=ActiveCell

???
 
Last edited:
Upvote 0
I think it might be more to do with the direction(s) you are searching.

When you find one don't you want to search backwards and up?

The idea I was thinking about would only work if your data was layout how you describe.

Is it?
 
Upvote 0
I think it might be more to do with the direction(s) you are searching.

When you find one don't you want to search backwards and up?

The idea I was thinking about would only work if your data was layout how you describe.

Is it?
I always want to search down from the parent account to find the child.

The layout can be like this

<table border="0" cellpadding="0" cellspacing="0" width="216"><tbody><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt; width: 54pt;" height="21" width="72">hello</td> <td style="width: 54pt;" width="72">
</td> <td style="width: 54pt;" width="72">
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>world</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>one</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>two</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>three</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">test</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>again</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test2</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test3</td></tr></tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="216"><tbody><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt; width: 54pt;" height="21" width="72">helloThere</td> <td style="width: 54pt;" width="72">
</td> <td style="width: 54pt;" width="72">
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>world</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>one</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>two</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>three</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">testThere</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>again</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test2</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test3</td></tr></tbody></table>
Or like this
<table border="0" cellpadding="0" cellspacing="0" width="216"><tbody><tr height="21"><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt; width: 54pt;" height="21" width="72">helloThere</td><td style="width: 54pt;" width="72">
</td><td style="width: 54pt;" width="72">
</td></tr><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt;" height="21">
</td><td>world</td><td>
</td></tr><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt;" height="21">
</td><td>
</td><td>one</td></tr><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt;" height="21">
</td><td>
</td><td>two</td></tr><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt;" height="21">
</td><td>
</td><td>three</td></tr></tr></tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="216"><tbody><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt; width: 54pt;" height="21" width="72">hello</td> <td style="width: 54pt;" width="72">
</td> <td style="width: 54pt;" width="72">
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>world</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>one</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>two</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>three</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">test</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>again</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test2</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test3</td></tr></tbody></table>
<table border="0" cellpadding="0" cellspacing="0" height="189" width="216"><tbody><tr style="height: 15.75pt;" height="21"><td style="height: 15.75pt; width: 54pt;" height="21" width="72">
</td> <td style="width: 54pt;" width="72">
</td> <td style="width: 54pt;" width="72">
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">testThere</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>again</td> <td>
</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test2</td> </tr> <tr style="height: 15.75pt;" height="21"> <td style="height: 15.75pt;" height="21">
</td> <td>
</td> <td>test3</td></tr></tbody></table>
----------------------------------------------
Is there a way to use cells.find to search down from a certain cell address? This is what I thought I was doing originally.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,331
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top