Good morning
I need to enhance this code to look for anything less than or equals to a date. This date is in Cell C1
Can the current code be adapted?![]()
Please Login or Register to view this content.
Thanks in advance
DJ
Good morning
I need to enhance this code to look for anything less than or equals to a date. This date is in Cell C1
Can the current code be adapted?![]()
Please Login or Register to view this content.
Thanks in advance
DJ
Are your dates in Column A?
You can use something liek this
=INDEX(Targets!$B$2:$AQ$337,IF(Targets!$A$2:$A$337<=$C$1,MATCH($C$1+0,Targets!$A$2:$A$337,0),""),MATCH(A6,Targets!$B$1:$AQ$1,0))
if this doesn't work can you upload some sample data with expected results
Excel Guru in the making
<----------If the question has been answered to your satisfication please click the Add Repuation star to the left
Hi, Yes my dates are in column A but that formula didn't work sorry. I will upload some sample data
Example.xlsx Example File Attached
Thanks
Instead of
=INDEX(Targets!$B$2:$AQ$337,MATCH($C$1+0,Targets!$A$2:$A$337,0),MATCH(A5,Targets!$B$1:$AQ$1,0))
try this
=INDEX(Targets!$B$2:$AQ$337,MATCH($C$1,Targets!$A$2:$A$337),MATCH(A5,Targets!$B$1:$AQ$1,0))
Samba
Say thanks to those who have helped you by clicking Add Reputation star.
That gives me the same result as the previous code. The answer in the example data for Book 2 should be £3,581,863.54 which is the sum of targets less than 01.09.14.
Regards
Perhaps in C5 and copy down.
Formula:
Please Login or Register to view this content.
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
Thanks that seemed to work but I'm now kicking myself for not trying that first. I though Sumproduct you could only use vertically and not a mixture of both vertically and horizontally. Hey, you live and learn.
Thanks everyone for the contributions
DJ
=SUM(OFFSET(Targets!$A$1,1,MATCH(A5,Targets!$B$1:$AQ$1,0),MATCH($C$1,Targets!$A$2:$A$337),1))
Try this formula
Yes. SUMPRODUCT can works vertically and horizontally. Everyone of us learn something new every day. So:
You are welcome and thanks for the feedback.
As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED,as per Forum Rule #9. Thank you.
Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks