Hi,
I've been struggling for the past few hours to get a countif function working in VBA. I have workbook that imports data and they creates a new sheet for item I wish. In this case it's cost centre. Within the workbook I have a summary sheet showing totals by cost centre. It's all fine and dandy getting the totals, using a simple sum. However I'm having a problem when I need to introduce an 'if'.
In terms of the declaration of targetsheet and lastrow2, these are fine as I have no problems when Im doing a simple sum, example below;Please Login or Register to view this content.
I suspect it's the structure of my formula, but after a few hours im having no luck at all. Anyone any idea's on how to get the top one working?Please Login or Register to view this content.
Cheers,
Lee
Bookmarks