#1   Report Post  
nospaminlich
 
Posts: n/a
Default Sumproduct error

I have a formula
=SUMPRODUCT((MONTH($A50)=MONTH(Data!$H$2:$H$15000) )*(YEAR($A50)=YEAR(Data!$H$2:$H$15000)))

This works fine when there are dates in Col H of the worksheet "Data".

The data in worksheet "Data" is imported (via a macro) from a CSV file as a
web query and parsed using Data, Text to Columns.

Occasionally a user will have added a spurious comma in the original data
source which pushes all the remaining fields for that row to the right. When
this happens Col H on the worksheet "Data" can contain text instead of a date
and I get a #Value! error from my Sumproduct formula.

Is it possible to amend the formula slightly so if there is text in Col H it
is ignored?

The sheet with the formula has over 400 Sumproduct formulas based on lots of
other more complex conditions so I'm hoping there's an easy solution but I'm
afraid I can't see it.

Thanks a lot for your help
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 7 March 7th 05 06:29 PM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 0 February 28th 05 06:26 PM
SumProduct Formula Error Josh O. Excel Worksheet Functions 5 February 14th 05 09:23 PM
SUMPRODUCT ERROR Mestrella31 Excel Discussion (Misc queries) 1 January 26th 05 08:01 PM
Sumproduct #num error Dominique Feteau Excel Worksheet Functions 2 December 19th 04 09:43 PM


All times are GMT +1. The time now is 06:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"