Unanswered: Moving directly left of a field using VBA
I'm trying to search through a few fields which will have names of employees. Once it finds an employee name I would like it to then look to the left of the employee name cell. Because directly to the left will be how many hours they have worked.
I've tried using something using i.address but vba doesn't seem to like it at all. Would I be better off just bruteforcing it somehow and examing the value of i.address and having a case statement for if it's c,e,g,i,k or m? Or is there some handy dandy way to actually move around cells?
For Each c In [c14:c16, e14:e16, g14:g16, i14:i16, k14:k16, m14:m16]
If IsEmpty(c.Value) = False Then
strSearchValue = c
FoundName = True
If FoundName = True Then
For Each i In [c14:c16, e14:e16, g14:g16, i14:i16, k14:k16, m14:m16]
If UCase(i.Value) = UCase(strSearchValue) Then
FoundName = False
Also any advice for how I can prevent a name from being looped through twice the when it is say the second time it appears it's read?
Storing the range in my loops as a variable and then editing the variable so it no longer has the range of a name that has already gone through the process.