Excel formula IF
2 TopicsVBA code: Count number of times a cell is changed if cell = Yes
I'm currently using a VBA code that tells me in Cell B15 the current number of times Cell C15 has changed, and that's great, but I have other cells (Cells F16 through F100) that I'd like to have start at a base of 1 and add 1 to the base value each time the specific cell changes if the other cells are activated via the keyword "Yes" in Column D (Cells D16 through D100). Not all of the cells are going to be activated at the same time and I'd like to be able to reset the number if at all possible to have it scale up more than once. Here is the formula I started with that is keeping track of the first changed cell. Private Sub Worksheet_Change(ByVal Target As Range) Dim xRg As Range, xCell As Range On Error Resume Next If Target = Range("C15") Then xCount = xCount + 1 Range("B15").Value = xCount End If Application.EnableEvents = False Set xRg = Application.Intersect(Target.Dependents, Me.Range("B9")) If Not xRg Is Nothing Then xCount = xCount + 1 Range("B14").Value = xCount End If Application.EnableEvents = True End Sub3.1KViews0likes0CommentsIF formula with dates
Hi all, thanks in advance for trying to help me. This is the following situation : I work at a big crewing company and I have to be warned when an individual with a certain nationality (A:A="DK")reaches a date (in this case G:G) + 90 days so I know to change a contract. I made the following formula: =IF(AND(A:A="DK";TODAY()>=G:G+90);"DO IT";"")&IF(AND(A:A="DK";TODAY<=G:G+90);G:G+90;) The problem I encounter is when the second IF clause returns true it shows the date not formatted ex."41234". I've tried formatting the column to show dates and various other things and it doesn't work. Please help !1.1KViews0likes1Comment