VBA - CountIf cell range displayed value is equal to desired value
问题 I am having an issue running my code through, because the Range.Value is different than the Range.NumberFormat . For example, my value is a date and time and I would like to test for the day of the week. I was able to get the number format to be Sun-Sat, however, I am unsure how to test for it with CountIf . Dim rep as Worksheet Dim day As Range Dim time As Range Dim wf As WorksheetFunction Set rep = Worksheets("Report") Set day = rep.Range("H1", rep.Range("H1").End(xlDown)) Set time = rep