+ Reply to Thread
Results 1 to 33 of 33

Calculate the Range based on certain values

  1. #1
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Smile Calculate the Range based on certain values

    Dear Friends,

    I would like to sum / calculate the range based on certain values of each cell.

    I attached a workbook for your kind ref.

    Please help me to solve.
    Attached Files Attached Files
    Good friends are hard to find, harder to leave, and impossible to forget.

    acsishere.

  2. #2
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Calculate the Range based on certain values

    Ok
    I made a little change on table. Replaced Category "A" header with letter "A" and etc.

    r4 cell =SUM(IF(LEFT($C4:$Q4,1)=R$3,MID($C4:$Q4,2,1),-1)+1) Ctrl Shift enter
    then drag it to right and down.

    If its correct then Click to star
    Attached Files Attached Files
    Appreciate the help? CLICK *

  3. #3
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Sir,

    Thanks for the solution.

    However, I want to change the values in K11:K13, so that the value of the SUM may be changed.

    For example, if I change the value of A1A to "5.25" then the SUM of the related rows also must be changed.

    Request your help.

  4. #4
    Forum Contributor
    Join Date
    03-11-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    107

    Re: Calculate the Range based on certain values

    Here this I think will get the desired results.

    Changing the values of the numbers require more if statements

    Hope this helps.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Calculate the Range based on certain values

    Hi, Withe the changing values I got no result. I used there helper rows and lookup table.
    Uploading file here for you to examine
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Sir,

    Thanks and it works.

    Yet, is there any possibility to get the desired result without creating "helper rows" for each and every row?

    Any solution will be there?

    Please...

  7. #7
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Sir,

    Thanks and it works.

    Yet, is there any possibility to get the desired result without creating "helper rows" for each and every row?

    Any solution will be there?

    Please...

  8. #8
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Sir,

    Any solution - without application of header row for each line item?

  9. #9
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Sir,

    Any solution - without applying the header row for each line item?

  10. #10
    Forum Contributor
    Join Date
    03-11-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    107

    Re: Calculate the Range based on certain values

    Pretty much no way around for getting around the helper rows for the letter and number. It's really not a problem because you can have a data/calc sheet and then have a separate sheet for your summary if you're worried about presentation.

  11. #11
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Calculate the Range based on certain values

    ok acsishere
    I think I solved your problem without header rows. Here is the array formula
    =IFERROR(SUM(LARGE($X$3:$X$5,RANK(LARGE(IFERROR(--(IF(LEFT($C4:$Q4,1)=R$3,MID($C4:$Q4,2,1),"")),""),ROW(INDIRECT("1:"&SUM(--ISNUMBER(IFERROR(--(IF(LEFT($C4:$Q4,1)=R$3,MID($C4:$Q4,2,1),"")),"")))))),$W$3:$W$5))),0)

    I think this time you should click Star.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Smile Re: Calculate the Range based on certain values

    Dear Sir,

    Thanks for your extraordinary efforts.

    Still, when tried to apply the formula with changes in the value, the formula is not picking up.

    If I put the fractions in the Y column, then no changes are done in the result.

    I attached the sample for your kind reference.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Sir,

    Please help......

  14. #14
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Calculate the Range based on certain values

    Quote Originally Posted by acsishere View Post
    Dear Sir,

    Thanks for your extraordinary efforts.

    Still, when tried to apply the formula with changes in the value, the formula is not picking up.

    If I put the fractions in the Y column, then no changes are done in the result.

    I attached the sample for your kind reference.
    Numbers there should be ranked. Number 2 must have max valu, 1 middle value and 0 min value. Otherwise it will not work.

    Any other solution I cannot give you, you may ask others. Surely Vba experts here can help you

  15. #15
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Friends,

    Any VBA solution? Though the formula serves the purpose, due to its lengthiness, it takes more time to do calculation. I fear If the size of the file increased, then it will be difficult.

    Kindly help to find a VBA solution.
    Last edited by acsishere; 05-07-2013 at 12:24 AM.

  16. #16
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Friends,

    Please help me.

  17. #17
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Calculate the Range based on certain values

    I suggest you to mark this thread as solved and create new post. If you want the VBA solution then create it in VBA section.

    Good luck

  18. #18
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Calculate the Range based on certain values

    Please do not create another thread in the programming / vba section. I have moved this thread to that section for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  19. #19
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Thanks for your moving my thread to VBA section.

    Kindly help me to find a solution.

  20. #20
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Friends,

    Hope I may get a solution for this.

  21. #21
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Friends,

    Please....

  22. #22
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Please.... Please.... Please....

  23. #23
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Calculate the Range based on certain values

    My friend, I wish I knew the VBA But I do not.
    I did my best in fnding formula solution for your problem. Hope others will help you.

    Good luck

  24. #24
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Sir,

    Thanks for your reply. As said, I hope someone will help me to find the solution.

  25. #25
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Request kind help.

  26. #26
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Please.....

  27. #27
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Calculate the Range based on certain values

    I think you should close this thread and open new one. Just try

  28. #28
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Sir,

    You are right. But moderators may not allow this.

    Alternatively, I give the link here, in which I requested the VBA modifications in an attached file.

    The link is:

    http://www.excelforum.com/showthread...=1#post3208947

    Hope to get the desired result.

  29. #29
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Kindly help me to find the solution.

  30. #30
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Friends,

    I hope that someone will lend helping hand.

    http://www.excelforum.com/showthread...=1#post3234381

    Please....
    Last edited by acsishere; 05-12-2013 at 03:51 PM.

  31. #31
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Friends,

    I don't know how to solve the required query. I tried all probabilities, but in vain.

    It seems that I must close this thread, if there is no objection from the moderators, and to start a new one, either in this forum or in some other forum.

    As I don't know what to do, I request the moderators to guide me.

  32. #32
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Sir,

    As I have not got any response, can I close this thread & open in a new forum? Request moderator's consent.

  33. #33
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: Calculate the Range based on certain values

    Dear Moderator,

    I request your kind consent to post this thread in some other forum to get the solution. Because, I feel that I don't want to be penalized for any reason from this EXCELlent forum.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1