+ Reply to Thread
Results 1 to 19 of 19

help to Make the function shorter and easier

  1. #1
    Registered User
    Join Date
    03-30-2020
    Location
    egypt
    MS-Off Ver
    2013
    Posts
    9

    help to Make the function shorter and easier

    hello everyone from Egypt

    kindly i need your support and help to Make the function shorter and easier , below function working good but i believe that other way to be more easier


    "&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$8="feb",SUMIFS(INDIRECT("'"&$E$2&"'!"&"q11:q20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$9="Mar",SUMIFS(INDIRECT("'"&$E$2&"'!"&"P11:P20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$10="Apr",SUMIFS(INDIRECT("'"&$E$2&"'!"&"q11:q20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$11="May",SUMIFS(INDIRECT("'"&$E$2&"'!"&"P11:P20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$12="Jun",SUMIFS(INDIRECT("'"&$E$2&"'!"&"q11:q20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$13="Jul",SUMIFS(INDIRECT("'"&$E$2&"'!"&"P11:P20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$14="Aug",SUMIFS(INDIRECT("'"&$E$2&"'!"&"q11:q20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$15="Sep",SUMIFS(INDIRECT("'"&$E$2&"'!"&"P11:P20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$16="Oct",SUMIFS(INDIRECT("'"&$E$2&"'!"&"q11:q20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$17="nov",SUMIFS(INDIRECT("'"&$E$2&"'!"&"P11:P20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    +IF(T$18="Dec",SUMIFS(INDIRECT("'"&$E$2&"'!"&"q11:q20000"),INDIRECT("'"&$E$2&"'!"&"b11:b20000"),$E$2,INDIRECT("'"&$E$2&"'!"&"k11:k20000"),$E$6,INDIRECT("'"&$E$2&"'!"&"l11:l20000"),$E$5,INDIRECT("'"&$E$2&"'!"&"n11:n20000"),B7),0)
    Last edited by waelwilliam; 03-30-2020 at 08:34 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: help to Make the function shorter and easier

    Hi
    posting a sample sheet like described in the yellow banner and some explanation would help us understand want you are trying to do

  3. #3
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: help to Make the function shorter and easier

    may be array formula
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-30-2020
    Location
    egypt
    MS-Off Ver
    2013
    Posts
    9

    Re: help to Make the function shorter and easier

    thank you very much but the result different

    amount appear the first month not sum for all month

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,610

    Re: help to Make the function shorter and easier

    See post #2

  6. #6
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: help to Make the function shorter and easier

    in this case read your first message and #2

  7. #7
    Registered User
    Join Date
    03-30-2020
    Location
    egypt
    MS-Off Ver
    2013
    Posts
    9

    Re: help to Make the function shorter and easier

    New Smart 2.rar - Upload of file failed.

    Sorry i cannot upload file

    size 8.7 MB XLS
    Sizw 2.4 ZIP
    Last edited by waelwilliam; 03-30-2020 at 07:20 AM.

  8. #8
    Registered User
    Join Date
    03-30-2020
    Location
    egypt
    MS-Off Ver
    2013
    Posts
    9

    Re: help to Make the function shorter and easier

    Quote Originally Posted by BMV View Post
    in this case read your first message and #2
    Sorry i cannot upload file i don't know why con i send sheet by mail ?

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,518

    Re: help to Make the function shorter and easier

    Post a SAMPLE workbook. We do not need (or even want) to see your entire dataset. If you want help with this, then spend a few minutes creating a sample workbook that shows the issue without the bulk.
    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.

  10. #10
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: help to Make the function shorter and easier

    Check the formula in first message. It is not full string.

  11. #11
    Registered User
    Join Date
    03-30-2020
    Location
    egypt
    MS-Off Ver
    2013
    Posts
    9

    Re: help to Make the function shorter and easier

    report in attach
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    03-30-2020
    Location
    egypt
    MS-Off Ver
    2013
    Posts
    9

    Re: help to Make the function shorter and easier

    it working good but for one month how we can make it full sting and sum select months

  13. #13
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: help to Make the function shorter and easier

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    03-30-2020
    Location
    egypt
    MS-Off Ver
    2013
    Posts
    9

    Re: help to Make the function shorter and easier

    not working

    yellow cell your function and green cell is right amont

    notes

    the amout should working in many sheets

    attach fie
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    03-30-2020
    Location
    egypt
    MS-Off Ver
    2013
    Posts
    9

    Re: help to Make the function shorter and easier

    notes

    the amout should working in many sheets

    attach fie
    Attached Files Attached Files

  16. #16
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,383

    Re: help to Make the function shorter and easier

    I'm not sure I understand exactly what is going on in your spreadsheet, but it looks to me like one of those cases where a lot of things will be simplified if you will combine all of the "SO1" type sheets into a single, large database. Then use pivot tables and/or SUMIFS() functions to add up the different values you want.

    see links in this post: https://www.excelforum.com/excel-new...ml#post4906705
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  17. #17
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: help to Make the function shorter and easier

    waelwilliam
    First of all it is array formula and you should finish it by Ctrl+Shift+Enter
    2nd some reference is different, I corrected it
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    03-30-2020
    Location
    egypt
    MS-Off Ver
    2013
    Posts
    9

    Re: help to Make the function shorter and easier

    Thank youuuuuuuuuuuu i working very good in E column only

    But when copy to right or left cell it not working
    i trig to correct from yesterday but not success , to how can a mind in formal i can't understand how it working

  19. #19
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: help to Make the function shorter and easier

    Please try at E7:F10

    =SUMPRODUCT(INDIRECT("'"&$E$2&"'!Q11:AB20000"),(INDIRECT("'"&$E$2&"'!K11:K20000")=E$6)*(COLUMN($A$1:$L$1)>=MATCH(E$3,$J$7:$J$18,))*(COLUMN($A$1:$L$1)<=MATCH(E$4,$J$7:$J$18,))*(INDIRECT("'"&$E$2&"'!L11:L20000")=E$5)*(INDIRECT("'"&$E$2&"'!N11:N20000")=$B7))


    Alternative formula

    =SUMPRODUCT(INDIRECT("'"&$E$2&"'!Q11:AB20000"),(INDIRECT("'"&$E$2&"'!K11:K20000")=E$6)*(COLUMN($A$1:$L$1)>=MONTH(1&E$3))*(COLUMN($A$1:$L$1)<=MONTH(1&E$4))*(INDIRECT("'"&$E$2&"'!L11:L20000")=E$5)*(INDIRECT("'"&$E$2&"'!N11:N20000")=$B7))
    Attached Files Attached Files
    Last edited by Bo_Ry; 03-31-2020 at 02:11 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Make Fomrula Shorter..
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 12-12-2017, 12:27 PM
  2. make 2 vba shorter and more compact
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2017, 02:39 PM
  3. COUNTIFS function makes excel slow, how to make the function "shorter"
    By Gifupack in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-07-2015, 07:01 AM
  4. How to make this formula shorter
    By PatrikIden in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-04-2015, 06:57 AM
  5. [SOLVED] How can I make this code shorter by using a loop. or there's any easier shorcuts code
    By romarkevinruiz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-10-2014, 08:53 AM
  6. Make VBA code shorter
    By juanrmz24 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-25-2013, 12:11 PM
  7. Improve Excel Help Text - Make easier to Find Function Refs
    By RichardAllen in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-10-2006, 01:00 AM

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