I have a spreadsheet with roughly 1500 lines, and I am trying to count the number of lines which have one cell value at 0 or lower, and then group them based off of the first 3 characters in another cell in that line.
This is my first attempt trying VBA, and I have done research on each section of this code but I've seen a fair number of contradicting answers for how to do each part of it. I based the code off of one I found to count the number of cells with a certain word in them, so it may be very far off from what I want.
For Each Cell in Range("S26:S1500")
Cell.Activate
If IsEmpty(Cell) Then Exit For
If Left(Cell.Value,3) >= 100 And Left(Cell.Value,3) <=150 And
If ActiveCell.Offset(0,-17) < 1 Then
MisProd = MisProd + 1
The result should be the total number of cells that start with 100 to 150 and have a cell 17 cells left as less than 1.
I instead receive a compile error: Expected: expression.