Hello,
A few months ago I asked for some help on counting tasks. It worked great! Thanks to RYLO Then the format change a small bit. I can NOT seem to figure this out. I can't see the forest through all the trees. Below I'm showing an example of the code I am using and an example of what my results are and what I am looking for. Thank you so much in advance for any help.
previous post
http://www.excelforum.com/excel-prog...ition-met.html
EDIT: Add Sample File!
Sample.xlsm
![]()
Sub TestCounter() For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row If Cells(i, 1) = "Number" Then If itemm Like "*A*X0" Then outrow = Cells(Rows.Count, "E").End(xlUp).Offset(1, 0).Row Cells(outrow, "E").Value = itemm Cells(outrow, "F").Value = cntr End If itemm = Cells(i, 2) cntr = 0 End If If Cells(i, 3) = 10 Then cntr = cntr + 1 Next i If itemm Like "*A*X0" Then outrow = Cells(Rows.Count, "E").End(xlUp).Offset(1, 0).Row Cells(outrow, "E").Value = itemm Cells(outrow, "F").Value = cntr End If End Sub
Column A Column B Column C Column D Column E Column F Column G Number 1A1X0 - Current Code Rand #'s Rand Text 10 1A1X0 10 Rand #'s Rand Text 10 2A1X0 5 Rand #'s Rand Text 10 3A1X0 5 Rand #'s Rand Text 10 4A1X0 5 Rand #'s Rand Text 10 1A2X0 - Need Code Rand #'s Rand Text 10 1A1X0 5 Rand #'s Rand Text 10 1A2X0 5 Rand #'s Rand Text 10 2A1X0 5 Rand #'s Rand Text 10 3A1X0 5 Rand #'s Rand Text 10 4A1X0 5 Number 2A1X0 - Rand #'s Rand Text 10 Rand #'s Rand Text 10 Rand #'s Rand Text 10 Rand #'s Rand Text 10 Rand #'s Rand Text 10 Number 3A1X0 - Rand #'s Rand Text 10 Rand #'s Rand Text 10 Rand #'s Rand Text 10 Rand #'s Rand Text 10 Rand #'s Rand Text 10 Number 4A1X0 - Rand #'s Rand Text 10 Rand #'s Rand Text 10 Rand #'s Rand Text 10 Rand #'s Rand Text 10 Rand #'s Rand Text 10
I hope I explained myself properly. Thank you.
Bookmarks