Formula Date modification by Rongzo1971

I had this question after viewing modification of formula as i get another problem..

i have another challenge where my database dates are stored in a weird way. please see attached. the formula returns zero

thanks for your help as usual. much appreciated.
EE3.xlsx
LVL 6
FloraAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
in F2, try this formula:

=SUMPRODUCT(B:B,--(A:A>=TEXT(DATEVALUE(LEFT(E2,8)),"YYYYMM")),--(A:A<=TEXT(DATEVALUE(RIGHT(E2,8)),"YYYYMM")))

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rgonzo1971Commented:
Hi,

pls try as an array formula (Ctrl+Shitf-Enter)
=SUMPRODUCT(B:B,IFERROR(--(VALUE(A:A)>=--(TEXT(DATEVALUE(LEFT(E2,8)),"yyyyMM"))),0),IFERROR(--(VALUE(A:A)<=--(TEXT(DATEVALUE(RIGHT(E2,8)),"yyyyMM"))),0))

Open in new window

Regards

EDIT yyyy for years
FloraAuthor Commented:
Thanks Ryan and Rgonzo.

both works fine.  i am just curious on the IFERROR used by Rgonzo.    why the IFERROR used here. what purpose does it serve?
FloraAuthor Commented:
Thank very much.
FloraAuthor Commented:
dear Ryan and Rgonzo.  i have posted a follow up question with sample data which i could not solve by myself.  it looks very complicated to add more condition to the sumproduct.

i really appreciate your help.   here is my question posted https://www.experts-exchange.com/questions/29068162/Formula-modification-help-needed-Rgonzo1971-Ryan-Chong-earlier-solution.html
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.