So, as a preface, I am a complete novice at excel. I recently attended a small vba seminar for excel and realized that vba could eliminate a lot of headache with my research. The problem is that I have little to no knowledge of programing, so I've been working at this for awhile now. Any help would be appreciated.
I'm attempting to write a program that will analyze names (that also have numbers in them) in one worksheet. We can call this Worksheet A -- the names are all in column A. I would like the program to then be able to search a second worksheet, worksheet B, and find the matching name. The name will also be in column A on worksheet B. I would then like the program to look at the data that is adjacent to the name in the row direction -- horizontally to the right and determine if the value is greater or smaller than .9 (greater than 0.9 in the positive direction or greater than -0.9 in the negative direction). If both the adjacent values next to the name in worksheets A and B meet the criteria, i.e. only if they are both greater than .9 or smaller than -.9 then I would like the program to output the name to a third worksheet -- worksheet c. It would also be lovely if it could output the associated numbers into the third worksheet, but I believe that will be way too difficult for me to do.
I have started to write something that Would find a name and then put it onto a third sheet. But, again, its a very elementary attempt, and I'm begining to believe that this is well beyond my capabilities.
Any pointers in the write direction or help would be greatly appreciated.
Sub DataCrunch()
Sheets("A").Select
Range("A1").Select
'this is my counter . . . count count count'
Dim Counter As Integer
Counter = 1
'this is my checker for name'
Dim Checker As Boolean
Checker = False
Dim TestOne As String
TestOne = ActiveCell.Value
Dim TestOneTrue As String
Sheets("B").Select
Range("A1").Select
Do While (Checker = False)
If (TestOne = ActiveCell.Value) Then
TestOneTrue = ActiveCell.Value
Sheets("C").Select
Range("A1").Value = TestOneTrue
Checker = True
Else
Sheets("B").Select
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub
that is what i have done
The file associated with that is attached.
Bookmarks