How to SUM Totals At Bottom of a Column Dynamically - Excel VBA Is Fun!

Поделиться
HTML-код
  • Опубликовано: 2 ноя 2024
  • 📊 Free Workbooks: www.excelvbais...
    🥷Join Excel Ninja Pro: www.excelvbais... Months FREE On Annual Plan Auto Applied)
    🥷Excel Ninjas FB Group: www.excelvbais... (Free downloads, Trainings, Live Q&A and more)
    In this lesson, we learn to get Totals or Subtotals DYNAMICALLY using VBA to determine the range and to insert totals, maybe even add some extras, like making it BOLD and adding the word "Totals:" beside it. Check it out!
    Fantastic Developer Tools:
    🔒 Transform Any Excel File Into A Locked EXE: www.excelvbais... (25% off with code ‘25OFF’)
    🟡 Create Custom Installers: www.excelvbais...
    👋 Business Inquiries, Consulting, Comments, etc: www.excelvbais...

Комментарии • 67

  • @ajlifesolutions7072
    @ajlifesolutions7072 3 года назад +1

    Definitely a Geek! 🤦‍♂️ Way above what I needed..

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  3 года назад

      Like... in a good way... right? lol
      Thanks, AJ. Hope it helps!
      Dan

  • @jeancardona143
    @jeancardona143 2 года назад +1

    You just saved me. Your video is clear, to the point, and actually really interesting.
    I hope you have a great day.
    All the best.

  • @MonicaPavlovich
    @MonicaPavlovich Год назад +1

    This was super helpful! Do you have a video explaining how to do this same VBA sum concept except with summing a row horizontally when the last cell in that row is changing as data is added/removed?

  • @dylankessler123
    @dylankessler123 2 года назад +1

    Thank you, you explained it very well, and I love the simplicity. I was stuck trying to combine multiple for loops, but this made perfect sense, and it actually worked! Thanks again!

  • @jaredwaters4633
    @jaredwaters4633 3 месяца назад

    Excellent. I'm just getting into this and this was very helpful

  • @GeronimoBraier
    @GeronimoBraier 8 месяцев назад

    Perfect explanation!!! You helped me a lot with this video!!!

  • @tektraninc.8176
    @tektraninc.8176 10 месяцев назад

    I've tried several approaches shown on You Tube, but nothing works to provide dynamic column totals. I wonder if my Professional version Office 2010 is not capable of this VBA? I know MS adds features to Excel each year.

  • @jmtiwari5766
    @jmtiwari5766 Год назад

    Good one. Thanks 👍

  • @culea0alex
    @culea0alex 10 лет назад +1

    Thanks dude. Your Dropbox files are cool too. I used "SUBTOTAL in Bottom Cell using Excel VBA.xlsm". It's exactly what i needed.

  • @schleckr4782
    @schleckr4782 6 лет назад

    Thanks for being very detailed in every move you made

  • @sonammishra2964
    @sonammishra2964 3 года назад

    Thanks a lot it help me to find the solutions

  • @luis711a
    @luis711a 7 лет назад

    Hey Buddy!! Thanks!! you do not know how difficult were to found a easy solution to the issue with the variable ranges, Thanks a lot.

  • @sharifashaikh5205
    @sharifashaikh5205 4 года назад

    Hello, This was awesome. Exactly what i needed. Your work is absolute marvel!!!! Could you please assist on how i can do this for multiple columns without repeating the codes each time. Thanks!

  • @PeggywongPeggy
    @PeggywongPeggy 5 лет назад

    how about i do have a first run for the consolidate for all worksheets into one worksheet. how am i going to sums everythings in my active worksheets

  • @titanium0987
    @titanium0987 8 лет назад

    Hi Daniel, what if I have a dynamic filter and I wanted to just get the sum of the filtered dataset? Please advise :) Thanks

  • @HerMagicWord323
    @HerMagicWord323 Год назад

    Thanks for the help

  • @khalidalkubaty9989
    @khalidalkubaty9989 6 лет назад

    Thank you very much but if I want to sum 2 columns like this, what will the code be ?

  • @somjos01
    @somjos01 8 месяцев назад

    Will you be able to post your code in the description ? It's not showing the entire code.

  • @BlakeC341
    @BlakeC341 2 года назад

    I'm trying to figure out how to design a model with a message box that requests a positive integer input and then populates a list of all the odd integers that occur before that positive integer entered and also provides the sum of all those negative integers at the bottom of the data set. So for example, if the user enters 8, then there will be a range of negative integers including 1, 3, 5, and 7 and a resulting sum of 16. How can this be achieved?

  • @mohammedelsayed3852
    @mohammedelsayed3852 5 лет назад

    From Egypt
    Thank you very very much

  • @SpiderWebUntangled
    @SpiderWebUntangled 11 лет назад

    Real nice, thank you, may I ask for an example if there are blank cells in Column B please. Or possibly zeros in the empty cells but the cells with zeros do not have visible text (numbers), maybe something like that if empty cells are not possible. Thank you. Duane

  • @guru_dude
    @guru_dude 11 лет назад

    looks good... you might want to try using "with" and "end with" to clean up the code a-bit ;)

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 лет назад

    You may be right. I generally do that when there are super lots of redundancies. Thanks for your comments, guru dude. Dan

  • @nanvdand
    @nanvdand 6 лет назад

    this helped a lot. thanks

  • @sasavienne
    @sasavienne 5 лет назад

    That is awesome. Thank you. 👍

  • @chestermujibelo6955
    @chestermujibelo6955 5 лет назад

    Well explained thanks

  • @michaeldingee743
    @michaeldingee743 9 лет назад

    Thanks for the tip. I have another question, using the same method how would you do a subtotal after row change. Example say the first 10 rows in Column A say Mike, there would be a total after that in column B , then the next 7 say Dan this would total, etc.
    Thanks Again for the tips

  • @leesungbong0704
    @leesungbong0704 2 года назад

    Thankyou^^

  • @funzonefamily2843
    @funzonefamily2843 5 лет назад

    need sumif sumifs countif countifs and pivot using vba please help me

  • @kiranarana7274
    @kiranarana7274 3 года назад

    Could you please add the vba
    The link does’nt work

  • @ExcelVbaIsFun
    @ExcelVbaIsFun  11 лет назад

    Thank you sobolev!

  • @Sobolev514
    @Sobolev514 11 лет назад

    Thanks a lot for this great effort Dan!

    • @damarihenrik7285
      @damarihenrik7285 3 года назад

      I guess Im kind of off topic but do anyone know of a good place to stream new movies online?

    • @rockymatthias3593
      @rockymatthias3593 3 года назад

      @Damari Henrik i would suggest Flixzone. You can find it on google =)

    • @masonanders3354
      @masonanders3354 3 года назад

      @Damari Henrik i would suggest Flixzone. You can find it on google :)

    • @isaiasraiden4160
      @isaiasraiden4160 3 года назад

      @Rocky Matthias yea, I have been watching on flixzone for since march myself =)

    • @stephenkamryn3876
      @stephenkamryn3876 3 года назад

      @Rocky Matthias thank you, signed up and it seems like they got a lot of movies there =) Appreciate it!!

  • @francois-xavierr.2710
    @francois-xavierr.2710 6 лет назад

    congrats, great video

  • @tektraninc.8176
    @tektraninc.8176 10 месяцев назад

    First line of VBA script is coming back with a bug? Highlighted in yellow. I checked your work twice. What I'm trying to do is add specific columns which is more real world at least for my applications. Please show your entire code.

  • @MohAboAbdo
    @MohAboAbdo 4 года назад

    Thank you so mutch

  • @7orqu3
    @7orqu3 11 лет назад

    i am having trouble with a very similar problem but mine is different in that i need to get the average of different size datasets in the same column so just like above the first dataset is so many rows long and you got the total of that now what i need to do i just insert a blank line and enter values for the next dataset and then get the average of that new dataset
    EXAMPLE
    DATASET1
    4
    5
    5
    5
    6
    6
    AVERAGE
    ?????
    DATASET2
    1
    1
    2
    3
    AVERAGE
    ????
    ANY IDEAS ?

  • @am3dz
    @am3dz 3 года назад

    i m facing an error in the first line of code runtime error 9 subscript out of range

  • @samiawad504
    @samiawad504 2 года назад

    Hello can i have the code please

  • @nivadonga6980
    @nivadonga6980 5 лет назад

    I am getting application defined or object-defined error on using this same code in the first line. Kindly help

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  5 лет назад

      Hi Niva,
      I wonder if there is text in any of the cells you're trying to add up or some other error. Does the regular SUM function work for the same range? If not, may we see your code, please? Thanks
      Dan

    • @vikyvixxxen3579
      @vikyvixxxen3579 4 года назад

      @@ExcelVbaIsFun im having the same error message also in the first line , i have 5 numbers to sum together in cells A1 to A5 no text, my sheets name is policka so i exchanged all the sheet1 with it . document type is csv because i had to load the numbers in from visual basic (everytime someone turns on Visual basic the amount and numbers change )

  • @napoleonblown_appart1942
    @napoleonblown_appart1942 8 месяцев назад

    code is =SUM(B2:B15)

  • @ckfoongproperty
    @ckfoongproperty 7 лет назад

    It cant work for below codes. Anyone can help?
    Sub ltd1()
    lastrow = ActiveSheet.Cells(Rows.Count, 12).End(xlUp).Row
    ActiveSheet.Range("l" & lastrow + 1) = Application.WorksheetFunction.Sum(ActiveSheet.Range("l2:l" & lastrow).Sum))
    End Sub

    • @ExcelVbaIsFun
      @ExcelVbaIsFun  7 лет назад

      Try removing the dot sum at the end. Also, I think you have an extra end parenthesis too many at the end. Like this:
      Sub ltd1()
      lastrow = ActiveSheet.Cells(Rows.Count, 12).End(xlUp).Row
      ActiveSheet.Range("l" & lastrow + 1) = Application.WorksheetFunction.Sum( ActiveSheet.Range( "l2:l" & lastrow ) )
      End Sub
      Thanks
      Dan

  • @baselinelegacy86
    @baselinelegacy86 6 лет назад

    part of your code is chopped off,..

  • @codewithhyder1553
    @codewithhyder1553 5 лет назад

    dear, you must clear your concepts first before uploading the videos

  • @patcarr8678
    @patcarr8678 Год назад

    this is confusing. seems you would know how to do it before making the video?

  • @rfgranzow
    @rfgranzow 8 лет назад

    Thanks, helped a lot.

  • @krn14242
    @krn14242 11 лет назад

    Thanks for the tip.