MatthewLane412
New Member
- Joined
- Aug 23, 2017
- Messages
- 24
Hello,
I'm trying to pull data from sheet 1 and insert it into a particular cell in sheet 3. This has worked perfectly however I need to lay down a set of limitations. If Column "I" contains either "666","637", or "639" in a cell I don't want the countif statement to count that row.
Hopefully this isn't confusing.
My countif coding is down below.
Thanks,
Matt
I'm trying to pull data from sheet 1 and insert it into a particular cell in sheet 3. This has worked perfectly however I need to lay down a set of limitations. If Column "I" contains either "666","637", or "639" in a cell I don't want the countif statement to count that row.
Hopefully this isn't confusing.
My countif coding is down below.
Thanks,
Matt
Code:
Sub IncomeStatement()
Dim I As Long
finRow = Sheet1.Range("A10000").End(xlUp).Row
I = 3
Sheet3.Range("B9") = Application.WorksheetFunction.CountIf(Range("AH3:AH" & finRow), "<365")
Sheet3.Range("B8") = Application.WorksheetFunction.CountIf(Range("AI3:AI" & finRow), "<365")
Sheet3.Range("B5") = Application.WorksheetFunction.CountIf(Range("AG3:AG" & finRow), "")
Sheet3.Range("B6") = Application.WorksheetFunction.CountIf(Range("U3:U" & finRow), "<365")
End Sub