ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
I am having an issue when i am pasting formulas to worksheet cells.
This is what i have in use but im getting RTE 1004 Application defined or object defined error
Can you advise please
This is what i have in use but im getting RTE 1004 Application defined or object defined error
Can you advise please
Rich (BB code):
Private Sub PasteFormulas_Click()
Dim WS As Worksheet
Set WS = Worksheets("INV")
WS.Range("G14").Formula = "=IFERROR(IF(INDEX(DATABASE!R:R,$H$13)=0,"",INDEX(DATABASE!R:R,$H$13)),"")"
WS.Range("G15").Formula = "=IFERROR(IF(INDEX(DATABASE!S:S,$H$13)=0,"",INDEX(DATABASE!S:S,$H$13)),"")"
WS.Range("G16").Formula = "=IFERROR(IF(INDEX(DATABASE!T:T,$H$13)=0,"",INDEX(DATABASE!T:T,$H$13)),"")"
WS.Range("G17").Formula = "=IFERROR(IF(INDEX(DATABASE!U:U,$H$13)=0,"",INDEX(DATABASE!U:U,$H$13)),"")"
WS.Range("G18").Formula = "=IFERROR(IF(INDEX(DATABASE!V:V,$H$13)=0,"",INDEX(DATABASE!V:V,$H$13)),"")"
WS.Range("L14").Formula = "=IFERROR(IF(INDEX(DATABASE!D:D,$H$13)=0,"",INDEX(DATABASE!D:D,$H$13)),"")"
WS.Range("L15").Formula = "=IFERROR(IF(INDEX(DATABASE!B:B,$H$13)=0,"",INDEX(DATABASE!B:B,$H$13)),"")"
WS.Range("L16").Formula = "=IFERROR(IF(INDEX(DATABASE!L:L,$H$13)=0,"",INDEX(DATABASE!L:L,$H$13)),"")"
WS.Range("L17").Formula = "=IFERROR(IF(INDEX(DATABASE!W:W,$H$13)=0,"",INDEX(DATABASE!W:W,$H$13)),"")"
End Sub