Hello All,
(first post) I am new to using VBA and extremely rusty when it comes to any type of code. I only did a few semester worth of coding in college and I'm lost at this point.
I am starting a personal project for work and I'm already getting stuck on some of the basics. I am currently trying to use a For loop to look through a column and locate cells that would be 100, 110, 120, 200, 210, etc. There are multiple blank lines between these number so I was trying to make a formula that will locate these numbers. I hand planned to use this function multiple times to pull various data from my worksheet and input them into another.
My idea was to use a simple Find function but it appears i cannot perform a search for a number when "i" is used. I was hoping I could get code to work similar to the following.
Dim i As Long
For i = 1 To 50
numb = i * 100
I'm not far along but helping me understand this part will help me accomplish a majority of what I want to do.
Thank you for your help!
(first post) I am new to using VBA and extremely rusty when it comes to any type of code. I only did a few semester worth of coding in college and I'm lost at this point.
I am starting a personal project for work and I'm already getting stuck on some of the basics. I am currently trying to use a For loop to look through a column and locate cells that would be 100, 110, 120, 200, 210, etc. There are multiple blank lines between these number so I was trying to make a formula that will locate these numbers. I hand planned to use this function multiple times to pull various data from my worksheet and input them into another.
My idea was to use a simple Find function but it appears i cannot perform a search for a number when "i" is used. I was hoping I could get code to work similar to the following.
Dim i As Long
Dim numb As Long
For i = 1 To 50
numb = i * 100
Cells.Find(What:=numb, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
Next i
Next i
I'm not far along but helping me understand this part will help me accomplish a majority of what I want to do.
Thank you for your help!