Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ActiveCell.FormulaR1C1 = "=if(Countif($J:$J,E2)=1,E2,"""")" My macro keeps throwing an error at this line. Is there an error in th syntax here -- cooldyoo ----------------------------------------------------------------------- cooldyood's Profile: http://www.excelforum.com/member.php...fo&userid=3561 View this thread: http://www.excelforum.com/showthread.php?threadid=57059 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this
ActiveCell.Formula = "=if(Countif($J:$J,E2)=1,E2,"""")" -- Gary "cooldyood" wrote in message ... ActiveCell.FormulaR1C1 = "=if(Countif($J:$J,E2)=1,E2,"""")" My macro keeps throwing an error at this line. Is there an error in the syntax here? -- cooldyood ------------------------------------------------------------------------ cooldyood's Profile: http://www.excelforum.com/member.php...o&userid=35611 View this thread: http://www.excelforum.com/showthread...hreadid=570597 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I tried that but the macro got stuck at that line. XL froze, I had to kill it. -- cooldyood ------------------------------------------------------------------------ cooldyood's Profile: http://www.excelforum.com/member.php...o&userid=35611 View this thread: http://www.excelforum.com/showthread...hreadid=570597 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Any other suggestions? Is there a syntax error on this line? I've tried the following: ActiveCell.FormulaR1C1 = "=if(Countif($J:$J,E2)=1,E2,"""")" ActiveCell.Formula = "=if(Countif($J:$J,E2)=1,E2,"""")" -- cooldyood ------------------------------------------------------------------------ cooldyood's Profile: http://www.excelforum.com/member.php...o&userid=35611 View this thread: http://www.excelforum.com/showthread...hreadid=570597 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The first line won't work--you're using .formulaR1C1 with A1 reference style
(J:J and E2). If you put this in the activecell manually, does excel continue to work ok: =if(Countif($J:$J,E2)=1,E2,"") I don't see anything with the formula or the second sample of code. cooldyood wrote: Any other suggestions? Is there a syntax error on this line? I've tried the following: ActiveCell.FormulaR1C1 = "=if(Countif($J:$J,E2)=1,E2,"""")" ActiveCell.Formula = "=if(Countif($J:$J,E2)=1,E2,"""")" -- cooldyood ------------------------------------------------------------------------ cooldyood's Profile: http://www.excelforum.com/member.php...o&userid=35611 View this thread: http://www.excelforum.com/showthread...hreadid=570597 -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Damn Dave your good, thats why i always look forward to your responses! Regards, simo -- Simon Lloy ----------------------------------------------------------------------- Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670 View this thread: http://www.excelforum.com/showthread.php?threadid=57059 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
But who knows why it's locking up????
Simon Lloyd wrote: Damn Dave your good, thats why i always look forward to your responses! Regards, simon -- Simon Lloyd ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708 View this thread: http://www.excelforum.com/showthread...hreadid=570597 -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Yes, it works if I manually put that formula in -- cooldyoo ----------------------------------------------------------------------- cooldyood's Profile: http://www.excelforum.com/member.php...fo&userid=3561 View this thread: http://www.excelforum.com/showthread.php?threadid=57059 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I still don't have another guess.
Sorry. cooldyood wrote: Yes, it works if I manually put that formula in. -- cooldyood ------------------------------------------------------------------------ cooldyood's Profile: http://www.excelforum.com/member.php...o&userid=35611 View this thread: http://www.excelforum.com/showthread...hreadid=570597 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
runtime error: syntax error or access violation | Excel Programming | |||
runtime error: syntax error or access violation | Excel Programming | |||
variable not declared error & syntax error | Excel Programming | |||
Syntax Error help | Excel Programming | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming |