Hello,
Please find attachment
i need sum between two date but my data structure different , please review my attachment and provide me help.
Amit Bhatt Sample File.xlsx
Hello,
Please find attachment
i need sum between two date but my data structure different , please review my attachment and provide me help.
Amit Bhatt Sample File.xlsx
Hi and welcome to the forum
1st, change the "dates" in row 1 to actual dates - 1/1/13, 2/1/13 etc - it always makes things easier if you keep data formats consitant
Then, based on your data, use this...
=SUMPRODUCT(($B$2:$Y$32)*($B$1:$Y$1>=$AC$3)*($B$1:$Y$1<=AC4))
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Hi,
Try this formula with your current formatting:where the following are named ranges:Formula:![]()
Please Login or Register to view this content.
- Day: $A$2:$A$32
- MonthYear: $B$1:$Y$1
- StartDate: $AC$3
- EndDate: $AC$4
Hope this helps![]()
Hello,
thanks for your reply but date not fix dear, for actual date you need to check column and row both.
Row has only days not complete date , to make complete date you need to consider Column also .
Row & Column = " 1 " & "Jan -2013" after that complete date come out = 01 - Jan - 2013.
thanks for your solution but its not work for me .
Regard,
Amit Bhatt
Try my solution Amit, this will fix your issue, and checks both row and column for complete date.
Without named ranges, the formula is:Formula:![]()
Please Login or Register to view this content.
ajryan, nice formulaMy main point is that when building workbooks, it always makes things simpler if data/heading formats can be kept consitsant
Your formula, without the range names would be....
=SUMPRODUCT(($B$2:$Y$32)*(DATE(YEAR($B$1:$Y$1),MONTH($B$1:$Y$1),$A$2:$A$32)>=$AC$3)*(DATE(YEAR($B$1:$Y$1),MONTH($B$1:$Y$1),$A$2:$A$32)<=$AC$4))
If the headings matched the date ranges, then that would shorten to...
=SUMPRODUCT(($B$2:$Y$32)*($B$1:$Y$1>=$AC$3)*($B$1:$Y$1<=AC4))
edit: Sorry, I didnt get that column A was days![]()
Last edited by FDibbins; 01-24-2014 at 06:37 PM.
Hello,
I have already formula for this but i want some short one.
on your both formulas its not working not getting any result value.
please look at below formula its working fine but i want short code for this one.
{=IF((TEXT(AA9,"MMM-YY"))<>(TEXT(AB9,"MMM-YY")),SUM(IF($B$2:$Y$2<=DATE(YEAR(AB9),MONTH(AB9),1)-1-$B$3+1,IF($B$2:$Y$2>AA9-$B$3,IF($B$2:$Y$2>DATE(YEAR(AA9),MONTH(AA9)+1,1)-1-$B$3+1,$B$4:$Y$34))))+SUM(IF($B$2:$Y$2=EOMONTH(AB9,0)-$B$3+1,IF($A$4:$A$34<=DAY(AB9),$B$4:$Y$34)))+SUM(IF($B$2:$Y$2=DATE(YEAR(AA9),MONTH(AA9)+1,1)-1-$B$3+1,IF($A$4:$A$34>=DAY(AA9),$B$4:$Y$34))),SUM(IF($B$2:$Y$2=DATE(YEAR(AA9),MONTH(AA9)+1,1)-1-$B$3+1,IF($A$4:$A$34>=DAY(AA9),$B$4:$Y$34))))}
Thanks, and I get your point Ford
Never mind, it took me 10 minutes of trying to make a formula before I realised the same thing
Works fine for me...
Whoops, try this one... Sample File (1).xlsx
Whoops, try this one... Attachment 292469[/QUOTE]
No result ,, check attachment please
Excel.png[QUOTE=ajryan88;3558906]
you can contact me on my skype >> Amit.bti
I don't know what is happening, but this is directly from your attachment: Capture.PNG
EDIT: And no, I won't be contacting you on Skype, they made a forum for helping people with Excel, and I plan on continuing to use it
Ok, no issue but as per your capture image cursor not on result BOX , and whatever i see on Formula bar that belong to other box.
Capturexx.png
thanks now i find simple solution based on your formula thanks a lot and its work for me perfectly.
so many thanks to you..
Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
Thanks.
Also, as a relatively 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.
No worries. Please don't forget to mark this thread as solved and please click on the * next to my post to say thanks![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks