vendredi 21 avril 2017

Add number to Cell that already has data

enter image description hereI'm trying to add 15 to the total sum of column "F" for every cell in column "D" that has the word "Total" in it. Obviously I'm going to be adding 45, since there are 3 cells that have "Total" in column "D". But I want this to work for other data that may have more. So far, I have the following (which isn't much):

If Right(Range("D" & rowNumber).Value, 5) = "Total" Then

It's probably easier than I think it is but I'm stuck after this point. Any help would be much appreciated. This is Excel Visual Basic.Thanks.

Aucun commentaire:

Enregistrer un commentaire