+ Reply to Thread
Results 1 to 29 of 29

Order. Macro to add by file line in excel

  1. #1
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Order. Macro to add by file line in excel

    Order. Macro to add by file line in excel
    Example I intend to have sum 10
    the macro sum per line in the value of 10
    423111 =?
    123411 =
    432211 =
    122234 =

  2. #2
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    https://www.excelforum.com/attachmen...1&d=1507306989
    Attached Files Attached Files

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,057

    Re: Order. Macro to add by file line in excel

    Sorry jorel, I don''t understand what the macro should do?
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Order. Macro to add by file line in excel

    Maybe:

    Data Range
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    1
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    2
    11234
    111234
    1111234
    11111234
    1.11E+08
    1.11E+09
    1.11E+10
    1.11E+11
    1.11E+12
    1.11E+13
    1.11E+14
    1.11E+15
    1.11E+16

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by xladept; 10-06-2017 at 02:07 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  5. #5
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    Hello, aladept, perfect, good job Can you put it inside the worksheet for download?

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Order. Macro to add by file line in excel

    I only did the one line but here:
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    This is not it, I need to add the formations then I will filter the ones of sum 10

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Order. Macro to add by file line in excel

    I don't understand

  9. #9
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    Just add up, you have to separate the three lists 5,6,7 digits
    And add
    Example =
    123341 = 16
    111421 = 10
    111321 = 9
    111224 =?

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Order. Macro to add by file line in excel

    This??
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    Okay XLAPEPT yes, yes, perfect, good job, but it does not have as much training in either 5,6,7
    In the sum of 10? Strange is all higher than 10.
    What I need in the three training lists up to 10
    Can you ride the three lists of 5,6,7
    Whose sum will always be 10, please
    Yes this is the work, but the formations must be within the sum of 10

  12. #12
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Order. Macro to add by file line in excel

    Maybe tomorrow - you want 5,6,7,8,9 digits that add up to 10??

  13. #13
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    hello ,yes, yes, that's correct! that's right! can do by doing, you repeat 3.4.5 times a digits
    example 111115 = 10 or
    1,1,1,1,2,2,2 = 10

  14. #14
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    hello ,xladept, please, sum 10

  15. #15
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Order. Macro to add by file line in excel

    I think someone has already done this - I'll put it before the Forum

  16. #16
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    Not in this post, do you have the link?

  17. #17
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Order. Macro to add by file line in excel

    Water Cooler "Call in the Cavalry".

  18. #18
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel


  19. #19
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Order. Macro to add by file line in excel

    Like xladept, I'm unclear on what your end result should look like, but hopefully my efforts prove helpful. Using your attachment from post #18, I inserted a blank column for column AP. I then used the following formula in cell Q5:

    =IF(ISNUMBER(MATCH(Q$4,$A5:$O5,0)),"x","Y")

    This formula replaces your yellow cells with the letter "Y", which is easier to work with than a color. This formula can be filled right through column AO and down through row 1564. With the "Y" values in place, you can then use the formula below in AQ5. This formula must be array entered (Confirmed with Ctrl + Shift + Enter instead of Enter):

    =IFERROR(1+SMALL(IF(($Q5:$AO5="Y")*(($R5:$AP5="x")+($R5:$AP5="")),COLUMN($Q5:$AO5)),COLUMN(A:A))-SMALL(IF(($Q5:$AO5="Y")*(($P5:$AN5="x")+($P5:$AN5="")),COLUMN($Q5:$AO5)),COLUMN(A:A)),"")

    Fill the formula right through BA5 and down through row 1564. The result should return your sequences of consecutive "Y" values. The formulas should automatically update as you change or refresh the data in columns A:O.

    No macros are used.

    Is this what you're looking for? Is it close? Take a look at the attachment to see if it helps:
    Attached Files Attached Files
    If your problem has been solved, please use "Thread Tools" to mark the thread as "Solved".

    If you're grateful for this site's existence and would like to contribute to the community, please consider posting something hilarious in our joke thread:
    https://www.excelforum.com/the-water...ke-thread.html

  20. #20
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    Hello, huuu! Perfect conglatulations very good job,
    Now you just need to put in a highlighted color
    Blue for x and yellow = y, and I'm still going to put it every week
    New sweepstakes (refresh) the macro has to do automatic
    When I'm going to start new raffles.
    Very good job, thank you

  21. #21
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Order. Macro to add by file line in excel

    I'm glad I could help! Coloring can be added with conditional formatting (See attached). When you change the numbers in A:O, everything else should adjust automatically. Hopefully that will be all that you need.

    Good luck!
    Attached Files Attached Files

  22. #22
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Order. Macro to add by file line in excel

    It took another field but try:

    Please Login or Register  to view this content.
    *Coloring

    Please Login or Register  to view this content.
    Last edited by xladept; 10-10-2017 at 05:02 PM.

  23. #23
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    Hello, perfect cantosh and xladipt did a great job!
    Congratulations, you got the best, fanstastic, thank you.

  24. #24
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Order. Macro to add by file line in excel

    You're welcome and thanks for the rep!

  25. #25
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    ok thank you!!

  26. #26
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    Hello cantosh, you can add the number of digits
    Example
    1231211 = 7 dig. sum 10
    121141 = 6 dig. Sum 10
    In a list next to see the frequency of the digits
    1 was drawn 500 times 2 = was drawn so many times 3 =? ....
    Up to 6 =
    Number of times that each type of training is drawn
    In the position we have 9 vertical positions
    1ª2ª3ª4ª5ª6ª7ª8ª 9ª
    1 2 3 1 2 1 1 = we have 7 positions
    1 2 1 ....
    ....... digit 1 in the first position has twice

  27. #27
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Order. Macro to add by file line in excel

    You can you COUNTIF for all of your statistics. For the number of digits in each entry, use the following in BD5, filled down:

    =COUNTIF(AQ5:BA5,">0")

    For the number of occurrences of each number per position, create a 10 x 10 matrix and use the following formula in the top left corner of the matrix (BG5 in the attachment):

    =COUNTIF(AQ$5:AQ$1564,$BF5)

    Hopefully that gets you what you need?
    Attached Files Attached Files

  28. #28
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,169

    Re: Order. Macro to add by file line in excel

    Hello CAntosh, huu! Perfect, magnifico, the best !!!!
    Much work! thank you

  29. #29
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Order. Macro to add by file line in excel

    My pleasure, good luck!

+ 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] for excel to automatically add in a line if customer places bigger order
    By chubbychub in forum Excel Formulas & Functions
    Replies: 29
    Last Post: 04-18-2016, 01:16 PM
  2. [SOLVED] VBA to detect change in order number, then add a value to each 1st line of that order
    By Marijke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-04-2013, 09:19 AM
  3. Replies: 10
    Last Post: 09-27-2012, 03:59 PM
  4. Excel Line Chart Editing Color and Reversing Order
    By collingwood in forum Excel General
    Replies: 0
    Last Post: 05-10-2012, 10:34 AM
  5. Command line for open excel, insert a sheet, execute a macro, save file exit?
    By uschxc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2012, 12:28 PM
  6. [SOLVED] pass arguments to macro of excel file from command line
    By poli in forum Excel General
    Replies: 0
    Last Post: 02-03-2006, 06:20 AM
  7. Series order conflicts with line order
    By Cowtoon in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 01-15-2006, 04:50 PM

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