Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I ran into this error 1004 while running the lines below

ThisWorkbook.Sheets("Master").Range(grossrow).Value =
    Evaluate("SUM(IF(((B:B)=""Games"")*((C:C)=""iPhone"")*((D:D)=""Grossing""),J:J))")

ThisWorkbook.Sheets("Master").Range(freerow).Value =
    Evaluate("SUM(IF(((B:B)=""Games"")*((C:C)=""iPhone"")*((D:D)=""Free""),J:J))")

The strange thing is sometimes it works but sometimes it doesn't. The data it is running through is very huge, around 18000 rows.

Anyone have any idea on why it happens?

share|improve this question
1  
What do you mean with "sometimes it works"? Does it run fully through all lines and sometimes not? Or does it run through the first lines and stops after a while? Can you shorten your 18000 rows and reproduce the error? –  nixda Dec 28 '12 at 11:40
    
Sometimes the line is able to compute and come out with the results. I just shorten the data to 10 rows and confirm it is not working. Is there anything wrong with the way the code is written? –  VBquestion Dec 31 '12 at 1:21
1  
Do these 10 lines contain sensitive information? Would you share your stripped down .xls sheet? I need some pastime for the night. –  nixda Dec 31 '12 at 1:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.