Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Help, cant figure out why it dosn't work.
hello all, I was wondering If I could get a little help with this line, i
cant figure out why it wont work. I use the same code on a different workbook with just the columns changed and it works fine.. j = ActiveSheet.Evaluate("=SumProduct(--(A1:A3000=" & _ CLng(CDate(nStuff)) & "),--(IsNumber(Find(""AH"",I1:I3000))))") however, in the same macro, these work correctly: i = Application.CountIf(.Columns(1), nStuff) k = Application.SumIf(.Columns(1), nStuff, .Columns(11)) so I know that the nstuff value is correct.. any help would be greatly appreciated. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Help, cant figure out why it dosn't work.
What does j equal when you run it? Or does the code blow up?
If j = 0, then maybe you don't have upper AH in I1:I3000 of that activesheet. The worksheet function =Find() is case sensitive. You can use =Search() if you have AH, ah, Ah or aH to match. Or maybe A1:A3000 don't have real dates in them--or nstuff isn't really a date? Michael A wrote: hello all, I was wondering If I could get a little help with this line, i cant figure out why it wont work. I use the same code on a different workbook with just the columns changed and it works fine.. j = ActiveSheet.Evaluate("=SumProduct(--(A1:A3000=" & _ CLng(CDate(nStuff)) & "),--(IsNumber(Find(""AH"",I1:I3000))))") however, in the same macro, these work correctly: i = Application.CountIf(.Columns(1), nStuff) k = Application.SumIf(.Columns(1), nStuff, .Columns(11)) so I know that the nstuff value is correct.. any help would be greatly appreciated. Thanks! -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
A What-if scenario changing one figure to work out another | Excel Worksheet Functions | |||
Function dosn't work in Excel 2007 but did in 2003 | Excel Worksheet Functions | |||
MS querry dosn't work when importing from DB2 after upgrading to 2 | Excel Worksheet Functions | |||
Can't figure out why Macro wont work???? | Excel Worksheet Functions | |||
File dosn't always close? | Excel Programming |