badgerstrader
New Member
- Joined
- Mar 18, 2020
- Messages
- 19
- Office Version
- 2019
- Platform
- Windows
ok so i have the following vba code
Sub AddFormula_TickDep()
Dim rng As Range
Dim ws1, ws2, ws3, ws4 As Worksheet
Dim result As String
Set ws1 = Sheets("Market")
Set ws2 = Sheets("Triggers")
Set ws3 = Sheets("Selection")
Set ws4 = Sheets("Odds")
Set rng = ws1.Range("AB11:AB50")
result = "=IFERROR(VLOOKUP(" & ws1.Range("A11").Address(0, 0) & "," & ws3.Range("$C$2:$D$28").Address(1, 1, , 1) & ",2,0),""0"")"
rng.Formula = result
End Sub
Currently cell AB11 to AB50 will show either the correct value or 0 however if i click on one of the cells i can see the formula
im looking to perform this in each sell from AB11 to AB50 without the Formula being visible if i click on one of the cells in question.
Thanks in advance.
Sub AddFormula_TickDep()
Dim rng As Range
Dim ws1, ws2, ws3, ws4 As Worksheet
Dim result As String
Set ws1 = Sheets("Market")
Set ws2 = Sheets("Triggers")
Set ws3 = Sheets("Selection")
Set ws4 = Sheets("Odds")
Set rng = ws1.Range("AB11:AB50")
result = "=IFERROR(VLOOKUP(" & ws1.Range("A11").Address(0, 0) & "," & ws3.Range("$C$2:$D$28").Address(1, 1, , 1) & ",2,0),""0"")"
rng.Formula = result
End Sub
Currently cell AB11 to AB50 will show either the correct value or 0 however if i click on one of the cells i can see the formula
im looking to perform this in each sell from AB11 to AB50 without the Formula being visible if i click on one of the cells in question.
Thanks in advance.