Need to edge out the competition for your dream job? Train for certifications today.
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
ActiveSheet.Range("A1:A100").AutoFilter Field:=1, Criteria1:=">0", _
Open in new window
'set up obj var to sheet
Dim wrkSht As Excel.Worksheet
Dim intSource As Integer
Dim intTarget As Integer
'set up row e target row starting value
intTarget = 1
'set obj to sheet
Set wrkSht = Application.Worksheets("Sheet1")
'loop through all rows used
For intSource = 1 To wrkSht.UsedRange.Rows.Count
'is the number posertive?
If wrkSht.Cells(intSource, "C").Value >= 0 Then
'place value into target row E
wrkSht.Cells(intTarget, "E").Value = wrkSht.Cells(intSource, "C").Value
'add next row for target row (E)
intTarget = intTarget + 1
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment