B
bbcdancer
The peice of code below works fine. However, I need the formulas after
calculating the answer to become paste special values. Example: "
=24+56" is a formula answer of 80 ...Which is what I currently get.
What I want in the cell is 80.
Is there a easy way to do this in the below code?
Many thanks...
Sub semiannual()
Dim v As Variant
Dim v1 As Variant
Dim rng As Range
Dim cell As Range
Dim res As Variant
v1 = Array("S")
Set rng = Range(Cells(3, 4), Cells(3, 4).End(xlDown))
For Each cell In rng
res = Application.Match(cell.Value, v1, 0)
If Not IsError(res) Then
cell.Offset(0, 3).Resize(1, 1).Value = "=RC[-5]+56 "
'Should paste special values here.
cell.Offset(0, 6).Resize(1, 1).Value = "=RC[-1]+76)"
'Should paste special values here.
End If
Next
End Sub
calculating the answer to become paste special values. Example: "
=24+56" is a formula answer of 80 ...Which is what I currently get.
What I want in the cell is 80.
Is there a easy way to do this in the below code?
Many thanks...
Sub semiannual()
Dim v As Variant
Dim v1 As Variant
Dim rng As Range
Dim cell As Range
Dim res As Variant
v1 = Array("S")
Set rng = Range(Cells(3, 4), Cells(3, 4).End(xlDown))
For Each cell In rng
res = Application.Match(cell.Value, v1, 0)
If Not IsError(res) Then
cell.Offset(0, 3).Resize(1, 1).Value = "=RC[-5]+56 "
'Should paste special values here.
cell.Offset(0, 6).Resize(1, 1).Value = "=RC[-1]+76)"
'Should paste special values here.
End If
Next
End Sub