Results 1 to 6 of 6

Thread: Sumifs

  1. #1

    Sumifs



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello everyone, I need some help please.

    I have a table with some numbers and dates on a sheet called "LISTADUZNIKA". On the other sheet called "Prometi",
    I'm using the formula SUMIFS to sum all the values for some specific date range. The problem is that I often change sheet "LISTADUZNIKA". I erase rows in "LISTADUZNIKA" sheet, but I want them to stay in sheet "Prometi" as they are. Now when I erase any row in "LISTADUZNIKA", the summed value in "Prometi" diminish. How can I fix that?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	1.jpg 
Views:	22 
Size:	88.0 KB 
ID:	3543   Click image for larger version. 

Name:	2.JPG 
Views:	9 
Size:	50.6 KB 
ID:	3544  

  2. #2
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,518
    Articles
    0
    Excel Version
    Excel 2016
    Hi,

    ARe you talking about the range reference in the formula, or the actual results? If it is the results, you won't be able to do that with a formula, you will need a vba solution with a button that only calculates when you press it.


  3. #3
    Conjurer hossat's Avatar
    Join Date
    May 2015
    Location
    Algiers, Algeria
    Posts
    114
    Articles
    0
    Excel Version
    365
    hi,
    it's better to share your workbook, it will be more comprehensive ...

  4. #4
    Magician navic's Avatar
    Join Date
    Aug 2013
    Location
    Europe, Croatia
    Posts
    901
    Articles
    0
    Excel Version
    Excel 2013
    Quote Originally Posted by Icepeak View Post
    Now when I erase any row in "LISTADUZNIKA", the summed value in "Prometi" diminish. How can I fix that?
    After copy data via VBA from Prometi Sheet to Sheet3, you can delete all data from LISTADUZNIKA Sheet

    copy this VBA code to Excel VBE your module Worksheet Prometi
    Code:
    Sub CopyRowsWithCondition()
    'copy all row from Prometi Sheet to Sheet3
    Dim i, LastRow
        LastRow = Sheets("Prometi").Range("A" & Rows.Count).End(xlUp).Row
        For i = 2 To LastRow
            If Sheets("Prometi").Cells(i, "A").Value <> "" Then
                Sheets("Prometi").Cells(i, "A").EntireRow.Copy Destination:=Sheets("Sheet3").Range("A" & Rows.Count).End(xlUp).Offset(1)
            End If
        Next i
      Range("A1").Select
    End Sub

  5. #5
    Ok, thank you everyone, but I think I'll have to do it someway diferent.

  6. #6
    Magician navic's Avatar
    Join Date
    Aug 2013
    Location
    Europe, Croatia
    Posts
    901
    Articles
    0
    Excel Version
    Excel 2013
    Quote Originally Posted by Icepeak View Post
    Ok, thank you everyone, but I think I'll have to do it someway diferent.
    Ok, it will be nice to you when you solve a problem then you write here how you solved the problem for the other members of the forum.
    In the meantime, see what it looks like my idea
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •