Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50099

How to determine range to select once a reference cell is found?

$
0
0
So i am a complete newb to this and am looking for help on something that should be simple. This is my first real attempt at writing anything in VBA. I am pulling data from a txt file and then parcing the data to find what I need. I got the code figured out to find a reference cell and select it. The cell selected is the last of 80 cell group I want to copy and copy it to a new page. I also know the text in the line 80 cells away (Az,Ze,Ds,Tolerence,Error). Because that line is generic and used multiple times in 15,000 lines of data I'm not sure if that would be an issue. Here is what I have:

Code:

If Left(Activecell.offset(1, 0).value, 20)= "AAC Half Inch Passed" Or _
Left(activecell.offset(1, 0).value, 20)= "AAC Half Inch Failed" Then
Activecell.offset(-31, 0).select

Moderators Note: Please follow Forum Rule #3 and use code tags. Added this time, but please use them in the future…Thanks.

Viewing all articles
Browse latest Browse all 50099

Trending Articles