Hi can anyone please help me in reducing the length of this formula
=IF(SUM(W7:Y7)<T7,(SUM(W7:Y7)/T7),IF(SUM(W7:Y7)>T7,(SUM(W7:Y7)-T7)/U7)+1)
I'm a beginner level user of excel.
Kindly help ASAP
Thanks in Advance.
Hi can anyone please help me in reducing the length of this formula
=IF(SUM(W7:Y7)<T7,(SUM(W7:Y7)/T7),IF(SUM(W7:Y7)>T7,(SUM(W7:Y7)-T7)/U7)+1)
I'm a beginner level user of excel.
Kindly help ASAP
Thanks in Advance.
If you only have those 2 tests, then it looks like you dont need that 2nd IF...
=IF(SUM(W7:Y7)<T7,(SUM(W7:Y7)/T7),(SUM(W7:Y7)-T7)/U7)+1)
what happens if it = T7?
Last edited by FDibbins; 08-09-2016 at 02:00 AM. Reason: left out a ,
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
Hey thanks for the quick reply.
I'll explain you the situation can you help me with the formula...?
If SUM(W7:Y7)<T7 then it should be SUM(W7:Y7)/T7
If SUM(W7:Y7)>T7 & <SUM(T7,U7) then it should be (SUM(W7:Y7)-T7)/U7)+1
If SUM(W7:Y7)>SUM(T7,U7) then it should be (SUM(W7:Y7)-SUM(T7,U7)/V7)+2
I need a formula which satisfies the above conditions.
As i have mentioned in the previous thread I'm a beginner level user of excel.
It would be of great help if u help me with the formula.
Thanks in Advance.
A shot in the dark...
=if(SUM(W7:Y7)>t7,SUM(W7:Y7)/t7, if(and(SUM(W7:Y7)>t7,SUM(W7:Y7)<t7+u7,((SUM(W7:Y7)-t7)/u7)+1, (SUM(W7:Y7)-SUM(T7,U7)/V7)+2))
(it's late and my brain went to bed long before me lol)
Hey Thanks for the reply but it didn't work![]()
Your requirement is ambiguous. What if the sum = T7, or =sum T7+U7???
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU
In my case it wil never be equal to T7 or T7+U7 !!
I know i'm being naive. But believe me i have done manual calculations on paper so i can say that it won't be equal.
Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.
Remember to desensitize the data.
Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
Try this out:
=IF(SUM(W7:Y7)<T7,SUM(W7:Y7)/T7,IF(AND(SUM(W7:Y7)>T7,SUM(W7:Y7)<SUM(T7,U7)),1+(SUM(W7:Y7)-T7)/U7,IF(AND(SUM(W7:Y7)>T7,SUM(W7:Y7)>SUM(T7,U7)),2+(SUM(W7:Y7)-T7)/V7)))
Hey guys i have finally got the formula which gave the correct answers....
=IF(SUM(W7:Y7)<T7,SUM(W7:Y7)/T7,IF(AND(SUM(W7:Y7)>T7,SUM(W7:Y7)<SUM(T7,U7)),1+(SUM(W7:Y7)-T7)/U7,IF(SUM(W7:Y7)>T7+U7,(SUM(W7:Y7)-SUM(T7,U7))/V7)+2))
ThanK you Glenn, with some modifications to your formula i got the result.
Now is it possible to make it shorter...?
As I said before, attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.
Remember to desensitize the data.
Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
Why do you want to make it shorter. It's not long... and if it works???
Hey ali I'm attaching the file....plz help me
Refer to the column Z (payback absolute)
Last edited by ramNrocky; 08-09-2016 at 05:39 AM.
Glenn its fine for me and its working too. But my friend is insisting me to shorten it. so i'm asking
If you used a helper column (let's say column Z) with this formula in Z7:
=SUM(W7:Y7)
then your formula from Post #10 would become:
=IF(Z7<T7,Z7/T7,IF(AND(Z7>T7,Z7<SUM(T7,U7)),1+(Z7-T7)/U7,IF(Z7>T7+U7,(Z7-SUM(T7,U7))/V7)+2))
as that expression occurs several time in the formula.
Hope this helps.
Pete
But that is Ony for row 7. I got a total of 42 rows. How do i use a helper column in that case ?
You copy the formulae down to cover the 42 rows.
Hope this helps.
Pete
As you stated here if they will never be equal then you can use this:
![]()
Please Login or Register to view this content.
That doesn't help @sanram
Thank you for your reply.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks