ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   syntax error (https://www.excelbanter.com/excel-programming/377443-syntax-error.html)

Nigel[_27_]

syntax error
 
i have checked similar statements throughout the posts in this group,
and it seems that my syntax is the same...but i get a syntax error..i
dont get it

ActiveCell.Formula = "=F" & LPS "-J" & LPS "

LPS is a variable populated with a row #


JLGWhiz

syntax error
 
Maybe: ActiveCell.Formula = "=F" & LPS & "-J" & LPS "



"Nigel" wrote:

i have checked similar statements throughout the posts in this group,
and it seems that my syntax is the same...but i get a syntax error..i
dont get it

ActiveCell.Formula = "=F" & LPS "-J" & LPS "

LPS is a variable populated with a row #



Chip Pearson

syntax error
 
Your quotes and & are out of whack. Use

ActiveCell.Formula = "=F" & LPS & "-J" & LPS


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
(email address is on the web site)

"Nigel" wrote in message
oups.com...
i have checked similar statements throughout the posts in this group,
and it seems that my syntax is the same...but i get a syntax error..i
dont get it

ActiveCell.Formula = "=F" & LPS "-J" & LPS "

LPS is a variable populated with a row #




Don Guillett

syntax error
 
try
activecell.formula = "=f" & lps & "-j" & lps & ""

--
Don Guillett
SalesAid Software

"Nigel" wrote in message
oups.com...
i have checked similar statements throughout the posts in this group,
and it seems that my syntax is the same...but i get a syntax error..i
dont get it

ActiveCell.Formula = "=F" & LPS "-J" & LPS "

LPS is a variable populated with a row #





All times are GMT +1. The time now is 11:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com