VBA help
I am writing a Macro that adds rather large formulas to cells, I decided to save myself some time by first recording the outline of the macro with dumby forumlas () and then adding the real formulas into the code editor.
Here is the desired formula:
Formula:
=VLOOKUP($B16,'HotelAVE Chart of Accounts'!$B$2:$C$30,2,FALSE)&"-"&VLOOKUP($C16,'HotelAVE Chart of Accounts'!$B$34:$C$66,2,FALSE)&"-"&VLOOKUP($D16,'HotelAVE Chart of Accounts'!$B$70:$C$73,2,FALSE)&"-"&VLOOKUP('Input Sheet'!$E16,'HotelAVE Chart of Accounts'!$B$78:$C$90,2,FALSE)&"-"&VLOOKUP('Input Sheet'!$F16,'HotelAVE Chart of Accounts'!$B$94:$C$407,2,FALSE)&"-"&VLOOKUP(IF($G16="","None",$G16),'HotelAVE Chart of Accounts'!$B$411:$C$704,2,FALSE)
Here is the desired macro:
Range("H16").Select
ActiveCell.FormulaR1C1 = "=IF(Banana=Bana,"""",Poop)"
Where dumby formula is "=IF(Banana=Bana,"""",Poop)".
Now, when I replace the dumby formula with the real formula above I get a compiler error that say 'end of statement' and the debugger highlights the "None" in the formula. Whats the deal and how can I fix it?
Bookmarks