troubleshooting Question

Excel VBA - I'm looking for code that will loop through a column and return a value to another column if a condition is true.

Avatar of jnikodym
jnikodym asked on
Microsoft ExcelVBA
2 Comments1 Solution110 ViewsLast Modified:
I have data in Column H of my excel file.  I want to hit a button on the sheet that will loop through the data in column H and if the data is not blank or a zero i want the value that is in that cell to be placed in cell J1.  Then if it finds another value that is not blank or a zero i want that value place in cell J2 and so on.

If my H column looked like this:
H1 = Green
H2 =
H3 = 0
H4 = 0
H5 = Blue

I would want my J column to look like this:
J1= Green
J2= Blue
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros