+ Reply to Thread
Results 1 to 28 of 28

sum of all "L" in cells

Hybrid View

ivan.985 sum of all "L" in... 04-03-2011, 05:41 PM
venkat1926 Re: sum of all "L" in... 04-05-2011, 07:45 AM
ivan.985 Re: sum of all "L" in... 04-05-2011, 10:28 AM
Marcol Re: sum of all "L" in... 04-05-2011, 11:12 AM
ivan.985 Re: sum of all "L" in... 04-05-2011, 02:53 PM
Marcol Re: sum of all "L" in... 04-05-2011, 03:20 PM
NBVC Re: sum of all "L" in... 04-06-2011, 09:07 AM
ivan.985 Re: sum of all "L" in... 04-06-2011, 04:15 PM
NBVC Re: sum of all "L" in... 04-06-2011, 04:34 PM
NBVC Re: sum of all "L" in... 04-06-2011, 07:49 PM
ivan.985 Re: sum of all "L" in... 04-07-2011, 09:22 AM
NBVC Re: sum of all "L" in... 04-07-2011, 10:55 AM
ivan.985 Re: sum of all "L" in... 04-07-2011, 11:37 AM
NBVC Re: sum of all "L" in... 04-07-2011, 11:42 AM
ivan.985 Re: sum of all "L" in... 04-07-2011, 12:01 PM
NBVC Re: sum of all "L" in... 04-07-2011, 12:02 PM
ivan.985 Re: sum of all "L" in... 04-07-2011, 12:07 PM
NBVC Re: sum of all "L" in... 04-07-2011, 12:11 PM
ivan.985 Re: sum of all "L" in... 04-07-2011, 12:16 PM
NBVC Re: sum of all "L" in... 04-07-2011, 12:33 PM
ivan.985 Re: sum of all "L" in... 04-07-2011, 12:44 PM
NBVC Re: sum of all "L" in... 04-07-2011, 12:49 PM
ivan.985 Re: sum of all "L" in... 04-07-2011, 12:56 PM
NBVC Re: sum of all "L" in... 04-07-2011, 01:00 PM
ivan.985 Re: sum of all "L" in... 04-07-2011, 01:41 PM
NBVC Re: sum of all "L" in... 04-07-2011, 01:50 PM
  1. #1
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    sum of all "L" in cells

    I'm from serbia and my english is very bad, but i can't find solution of my problem on my language!

    I need to sum all letter L and all letters R in all sheets in sheet "Poručivanje okova"
    When i in first sheet "K1-OK", in cell D32 choose option "Obradi" then in last sheet in cell C29 and cell D29 calculate how much letters L and R in anothers sheets in cells where writes "Donji falcni nosač na krilu" and need result need to be like 10L and 10R!

    How can I put button in excell sheet to change option like in cell d32 in first sheet, when i click on button to be like i choose options "Obradi"!

    Thanks a lot!
    Attached Files Attached Files
    Last edited by ivan.985; 04-07-2011 at 03:44 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: sum of all "L" in cells

    You seem to be familiar with excel. I suppose you are also familiar with macros.

    I have given a macro called "test"
    Your excel is excel 2007

    in this file click "developer" ribbon at the end of the main ribbon list
    then go to extreme left and click vb editor
    on the left if the project window is not open hit control+R
    you will see in the project window all the open file names
    there in go to this file "copy of kronja...." and highlight the file
    click "insert" in the menu bar and click "module"
    in the resulting window copy the macro "test" given below
    save the file

    now choose "developer" ribbon if it is not already chosen
    the second icon from the extreme left is "macros"
    click that.
    in the macro window which open you see the name "test"
    highlight "test" and click "run" on the right.
    now go to the last sheet "poru........." and see the columns P and Q
    In these columns you see the number of L/R in each sheet except last sheet
    you see there are 12 L/R and not 10.

    the macro is

    Sub test()
    Dim j As Integer, k As Integer, m As Integer, n As Integer
    m = 0
    j = Worksheets.Count
    For k = 1 To j
    If k = j Then GoTo nextk
    n = WorksheetFunction.CountIf(Worksheets(k).Cells, "L/R")
    m = m + n
    Worksheets(8).Range("P1").Offset(k - 1, 0) = Worksheets(k).Name
    Worksheets(8).Range("Q1").Offset(k - 1, 0) = n
    nextk:
    Next k
    'MsgBox m
    Worksheets(8).Range("P1").End(xlDown).Offset(1, 0) = "total"
    Worksheets(8).Range("Q1").End(xlDown).Offset(1, 0) = m
    End Sub
    I am sending back the file AFTER running the macro "test" . you see results in the last sheet columns P and Q
    If you want to recheck delete columns P and Q in the last sheet "poru....." and then
    again run the macro "test" as explained above

    My first language is also NOT English.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    thanks for the attempt. But i't seems, to that code not doing well. I dont see how and what he account. But realy thanks I thought that nobody would want to answer.
    Maybe we dont understud each other.
    I need only when i klik in list box option "Obradi" (in sheet "k1-Ok" in cell D32; in sheet "1K-ok-1o" in cell D32) and like that in all other sheet. When i click to that, then code need to sum all cell in all sheet L21; L25; L23; L29; M25;M27in sheet "Porucivanje okova" in cell E32. And in last sheet in cell C32 and D32 how much have L and How much R!

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: sum of all "L" in cells

    This looks more like a formula problem.
    Can you put some real values your sheets?
    This might help with the translation problem, then we might be able to trace the data better.

    I can't find values in M25;M27 anywhere!

    Also try to get rid of merged cells, they will just make life hard for no good reason.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    you must to enter some numbers like 2000 under image and from left side of image and above image, also you must choose is he left or right in c23 in first sheet and left from them some number 1 or 2 that number is how much window you make! Also you must choose is he "Okretni" or "okretno/nagibni" in cell d23 in first sheet and choose what profile in cell D33. must enter all information, just then he calculate all information and when you choose in list box "Obradi" he put information in last sheet! that is the point! Merged cell must stay like that, because of printing!

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: sum of all "L" in cells

    Can't look at it just now, I'll have a go if nobody else tries before I get back.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    I'll give this 1 try:

    I think the easiest way would be to assign one cell in each sheet (the same cell) and enter a formula in each that sums those values in each sheet.

    Then you can add a formula in the summary sheet that sums that cell from each sheet.

    For example, say you pick cell T2 in each each to contain a summing formula, then you can have something like:

    =IF(D32="Obradi";SUMIF(J21:J29;"L";L21:L29);0)

    and in T3


    =IF(D32="Obradi";SUMIF(J21:J29;"R";L21:L29);0)

    so if D32 is not Obradi, you will get 0.

    do this in each sheet, and change L's to M's where necessary to get same result.

    Then in the last sheet you would sum that cell from each sheet with formula like this:

    =SUM('K1-OK:Vrata 1K'!T2) for "L" count

    and


    =SUM('K1-OK:Vrata 1K'!T3) for "R" count

    You may need to translate the functions to your language
    Last edited by NBVC; 04-06-2011 at 09:09 AM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  8. #8
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    this is almoust Ok, but what i to do with second and sixth sheet; where J25 in second and K27 in sixth sheet. There is show L/R or R/R or something like that, in one cell! How there to calculate how much L and how much r show! I don't know, do you understand that in row "KOM" is number of L and R and half of that number is L and half R, or if in K27 Show R/R then number in row "Kom" is number of R for that sheet! If that can with function that will be good!!!

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    How about you use formula in T2 of each sheet:

    =IF(D32="Obradi";SUM(SUMIF(J21:J29;{"L";"L/L"};L21:L29))+SUM(SUMIF(J21:J29;{"L/R";"R/L"};L21:L29))/2;0)

    and, in T3

    =IF(D32="Obradi";SUM(SUMIF(J21:J29;{"R";"R/R"};L21:L29))+SUM(SUMIF(J21:J29;{"L/R";"R/L"};L21:L29))/2;0)

    change or add for K where necessary.

  10. #10
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    Yes, YES, YES, you are king of excell

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    Repost the sheet with information manually filled in to show what you are trying to do. Also mention exactly where the information would come from for each column.

  12. #12
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    just need that cell color copy in cell color of last sheet! but only when choose option "Obradi" in orange cell! And if one time choose "Obradi" all information copy in last sheet an if I change numbers and information in other sheet again that information copy in column bottom! and again to the last one!
    Attached Files Attached Files

  13. #13
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    Have a look at the attached.

    First somewhere on the side, list all the sheets involved. I listed them in Q5:Q11, for example.

    Then in R5 I entered formula:

    =IF(INDIRECT("'"&$Q5&"'!D32")="Obradi",INDIRECT("'"&$Q5&"'!A21"),"")
    and copied down. This looks at the sheet which is named in Q5 and sees if Obradi is in D32, and if it is it returns the "green" dimension otherwise it remains blank.

    Note: You may have to change the some references because some of your sheets have the "yellow", "green" and/or "red" cells in different locations.

    You can copy that formula down.

    The formulas in the next 2 columns are similar, but they get back the "yellow" and "red" data:

    Now in the main table, to get the Sheetnames that have dimensional info, into columns B:D, you have to unmerge the column, so I recommend you delete C and D and just make B wider and center the text....

    Then in B17 you enter:

    =IFERROR(INDEX(O$5:O$11,SMALL(IF(ISNUMBER(P$5:P$11),ROW(O$5:O$11)-ROW(O$5)+1),ROWS($A$1:$A1))),"")
    This is an array formula and you have to hold the CTRL and SHIFT keys down before pressing ENTER so that the { } brackets appear, then you can copy the formula down.

    To get the "green" info, it is a similar array entered formula:

    =IFERROR(INDEX(R$5:R$11,SMALL(IF(ISNUMBER(R$5:R$11),ROW(R$5:R$11)-ROW(R$5)+1),ROWS($A$1:$A1))),"")
    Then "yellow" and "red" columns would be similar.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    that is it. You are God! But can you help me just one more I ask you in last post but you not read, how can he remeber first choice! When enter information in first sheet and click "Obradi" and he enter that information in last sheet, and after that i modify information in first sheet, but he don't modify them in last but insert new information in column below???

  15. #15
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    I may have read it, but I certainly didn't understand it.

    If you mean, does the line disappear from the last sheet, if anyone changes D32 from Obradi to anything else, then yes, it will disappear from the list in the last sheet.

    If you want the line to remain even if the user removes Obradi from a D32 cell, then no, it can't be done with normal Excel functions. You would need to rework all the above work using VBA macros....

  16. #16
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    Ok thanks! I try those codes and all working except for sheet 2K-OK-2FIX. I try to repair but i don't know how i change formulas for that cell but still don't working. Try you please! God bless you and your family for this answers, you don't know how much you help me!

  17. #17
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    Please be more specific. Which exact formula in which cell. Also what should the real result be?

  18. #18
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    when I enter all in sheet 2K-OK-2FIX nothing show for that sheet in last sheet! Try you and find out what happend!

  19. #19
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    As I mentioned earlier, you do not have the "green", "yellow" and "red" cells consistently placed in same cells on all the sheets, so you will need to change some of the formulas in the Otpremnica sheet in P5:R11 so that the formulas point to the right cells.

    See attached
    Attached Files Attached Files

  20. #20
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    yes i do that but nothing happed after that! and I download your last attach and i modify in them but nothing!

  21. #21
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    My last attachment showed you that you had to change the formulas.

    I don't understand what you mean when you say... "I modify in them but nothing!"

  22. #22
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    I change formulas for all and all working except sheet 2K-OK-2FIX!

  23. #23
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    Please show me! Post the workbook!

  24. #24
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    here is it!
    Attached Files Attached Files

  25. #25
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    In that sheet, your Obradi cell is in D33 not D32 like all other sheets.

    Move it to D32 for consistency!

  26. #26
    Registered User
    Join Date
    04-03-2011
    Location
    Serbia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: sum of all "L" in cells

    sorry, i doing this "program" for mounth, and my brain is overloaded! thanks!

  27. #27
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum of all "L" in cells

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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