CodexBloom - Programming Q&A Platform

Excel SUMIFS optimization guide with Dates Formatted as Text in Different Locale

👀 Views: 411 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-12
excel formulas dates Excel

This might be a silly question, but I'm working with an scenario with the `SUMIFS` function in Excel where I'm trying to sum sales data based on date criteria, but it seems to be ignoring my date filters when the dates are formatted as text. My dataset contains sales records with date entries that are formatted as 'DD/MM/YYYY' in one locale, but the system settings are set to 'MM/DD/YYYY'. I attempted to convert the date strings to actual date values by using the `DATEVALUE` function, but I keep getting `#VALUE!` errors. Here's the formula I used: ```excel =SUMIFS(Sales!C:C, Sales!A:A, ">=" & DATEVALUE("01/03/2022"), Sales!A:A, "<=" & DATEVALUE("31/03/2022")) ``` I've also tried using `TEXT` function: ```excel =SUMIFS(Sales!C:C, Sales!A:A, ">=" & TEXT("01/03/2022", "DD/MM/YYYY"), Sales!A:A, "<=" & TEXT("31/03/2022", "DD/MM/YYYY")) ``` However, I'm still getting a `0` result even when there should be matching records. I've checked my locale settings and they seem fine, but the text-to-date conversion isn't working as expected. Has anyone encountered a similar scenario and knows how to properly format and sum these dates in `SUMIFS`? Any help would be greatly appreciated! Am I missing something obvious?