+ Reply to Thread
Results 1 to 4 of 4

Non-General Conditional Sum VBA CODE

  1. #1
    Forum Contributor
    Join Date
    09-01-2020
    Location
    bangladesh
    MS-Off Ver
    office 2007
    Posts
    167

    Non-General Conditional Sum VBA CODE

    The calculation corresponds to C3:C26, and the sum of the amount of D3:D26 is placed in column E`

    Can someone please help me ? It would be much appreciated
    Attached Files Attached Files
    Last edited by rayhen; 04-27-2023 at 10:20 PM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Non-General Conditional Sum VBA CODE

    try
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-01-2020
    Location
    bangladesh
    MS-Off Ver
    office 2007
    Posts
    167

    Re: Non-General Conditional Sum VBA CODE

    WOW jindon you are awesome thanks for your help problem solved

  4. #4
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Non-General Conditional Sum VBA CODE

    Hello. And if you want a way that doesn't contain iterations, you can try:

    PHP Code: 
    Sub Macro_8()
    With Range("D3", [D3].End(xlDown))
      .
    Columns(2) = "=D3+E4-E4*(C4<>"""")"
      
    .Columns(2) = .Columns(2).Value
      
    .Columns(0).SpecialCells(4).Offset(, 2).ClearContents
    End With
    End Sub 
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

+ 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] Problem converting Worksheet code to a general module code.
    By aquixano in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2020, 10:00 AM
  2. Link a General Journal to General Ledger Debit or Credit balance
    By detoge in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-22-2015, 09:49 PM
  3. General code layout question
    By Rob K in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-22-2015, 09:34 AM
  4. General question regarding Code and Formulae
    By hammer2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2014, 08:40 PM
  5. General code for locking cells
    By Dhakan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2014, 04:02 AM
  6. [SOLVED] Code not running w/o general edit
    By AMSBenji in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2013, 10:21 AM
  7. Run Event Code In General Module
    By Who I Am in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2006, 02:30 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