# Sum of Offset Values

#### Lauren123

##### New Member
Hi, I have this formula, but i would like to just have in "K" the sum of offset(0,3)+offset(0,4) is it possible on VBA or should i add up that on the sheet and just copy it?

Rw = 11
With Sheets("Draft")
For Each Cl In .Range("K7", .Range("K" & Rows.Count).End(xlUp))
If Cl.Value = "YES" Then
Sheets("U-Detail").Range("K" & Rw).Value = Cl.Offset(0, 3)
Rw = Rw + 1
End If
Next Cl
End With
' Tax
Rw = 11
With Sheets("Draft")
For Each Cl In .Range("K7", .Range("K" & Rows.Count).End(xlUp))
If Cl.Value = "YES" Then
Sheets("U-Detail").Range("L" & Rw).Value = Cl.Offset(0, 4)
Rw = Rw + 1
End If
Next Cl
End With

### Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

#### My Aswer Is This

##### Well-known Member
Try this:
Code:
``````Sub Add_Me()
'Modified 5/24/18 9:20 PM EDT
Application.ScreenUpdating = False
Dim Cl As Range
Dim RW As Long
RW = 11
With Sheets("Draft")

For Each Cl In .Range("K7", .Range("K" & Rows.Count).End(xlUp))
If Cl.Value = "YES" Then
Sheets("U-Detail").Range("K" & RW).Value = Cl.Offset(0, 3) + Cl.Offset(0, 4).Value
RW = RW + 1
End If
Next
End With
Application.ScreenUpdating = True
End Sub``````

Replies
7
Views
131
Replies
7
Views
67
Replies
3
Views
73
Replies
3
Views
47
Replies
3
Views
22