Macro Syntax Error

Closed
luqman - Feb 26, 2014 at 10:43 AM
 Blocked Profile - Feb 26, 2014 at 04:24 PM
HELLO THERE
NEED HELP TO RESOLVE AND MAKE THE BELOW CODE WORK IN EXCEL(MACRO)
ActiveCell.FormulaR1C1 = _
"=IF(RC[-2]=""10X"",""Acquisition on dollar alone"",IF(RC[-2]=""10Y"",""Acquisition on Local alone"",IF(RC[-2]=""1AX"",""Transfer in dollar only"",IF(RC[-2]=""1X5"",""Credit note on dollar books"",IF(RC[-2]=""1Y5"",""Credit note on local books"",IF(RC[-2]=""20X"",""Scrap of dollar only asset capitalised in current Fiscal year"",IF(RC[-2]=""20Y"",""Scrap of local only"& _
"apitalised in current Fiscal year"",IF(RC[-2]=""20Z"",""Scrap of convertible asset capitalised in current Fiscal year"",IF(RC[-2]=""21X"",""Transfer out of dollar only asset in current fiscal year"",IF(RC[-2]=""21Z"",""Transfer out of local only/convertible asset setup in current fiscal year"",IF(RC[-2]=""22X"",""Retirement by lost-New asset dollar only"",IF(RC[-2]="& _
""Retirement by lost-New asset local only"",IF(RC[-2]=""22Z"",""Retirement by lost-New asset convertible only"",IF(RC[-2]=""25X"",""Retirement by sale-New asset dollar only"",IF(RC[-2]=""25Y"",""Retirement by sale-New asset local only"",IF(RC[-2]=""25Z"",""Retirement by sale-New asset convertible only"",IF(RC[-2]=""28X"",""Trade in Group asset-Dollar only"",IF(RC[-2]"& _
"""Trade in Group asset-local only"",IF(RC[-2]=""28Z"",""Trade in Group asset-local and dollar only"",IF(RC[-2]=""2X0"",""Retirement by scrap-Group old asset"",IF(RC[-2]=""2XE"",""PI Scrap -Dollar old asset"",IF(RC[-2]=""2Y0"",""Retirement by scrap-Local only capitalised in prior fiscal years"",IF(RC[-2]=""2Z0"",""Retirement by scrap-convertible capitalised in prior "& _
"ars"",IF(RC[-2]=""2Z1"",""Transfer out convertible/local only-capitalised in prior fiscal years"",IF(RC[-2]=""2Z2"",""Retirement by Lost-convertible capitalised in prior fiscal years"",IF(RC[-2]=""2Z5"","""",IF(RC[-2]=""3Y0"",""Transfer of values-Local only asset capitalised in prior fiscal years"",IF(RC[-2]=""3Z0"",""Transfer of values-convertible asset capitalised"& _
" fiscal years-Will reflect in sending asset"",IF(RC[-2]=""3Z1"",""Transfer of values-convertible asset capitalised in prior fiscal years-Will reflect in receiving asset"",IF(RC[-2]=""4Y0"",""Post capitalization local only"",IF(RC[-2]=""4Z0"",""Post capitalization convertible only"",IF(RC[-2]=""65X"",""Accelerated Dep dollar only new asset"",IF(RC[-2]=""65Y"",""Accel"& _
"p local only new asset"",IF(RC[-2]=""65Z"",""Accelerated Dep convertible new asset"",IF(RC[-2]=""6Y4"",""Accelerated Dep local only old asset"",IF(RC[-2]=""6Z5"",""Accelerated Dep convertible old asset"",IF(RC[-2]=""300"",""cost center change-Will reflect for old cost center"",IF(RC[-2]=""310"",""cost center change-will reflect for new cost center"",IF(RC[-2]=100,"""& _
"on on local and dollar"")))))))))))))))))))))))))))))))))))))))"
IT DOES WORK IN EXCEL BUT NOT IN VBA, I WILL BE HIGHLY THANK FULL FOR ALL YOUR REPLIES
EVERY TIME IM GETTING A SYNTAX ERROR
DO KINDLY HELP
Thanks in advance
Regards
Luqman

1 response

Blocked Profile
Feb 26, 2014 at 04:24 PM
Dearest Member, VBA is not a formula. You must structure the above into code, it is currently structured as a formula. Two different things.

After reveiwing some of the qualifing materials, why not pay for professinal services, as you are familiar it looks with terms like COST CENTER, FISCAL, and CAPITILIZED?



"If you can't soar with the eagles, then don't fly with the flock!" - Oliver Sykes; Bring Me The Horizon
0