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?
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?
try this
ActiveCell.Formula = "=if(Countif($J:$J,E2)=1,E2,"""")"
--
Gary
"cooldyood" <cooldyood.2ccsvj_1155262814.8071@excelforum-nospam.com> wrote in
message news:cooldyood.2ccsvj_1155262814.8071@excelforum-nospam.com...
>
> 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
>
I tried that but the macro got stuck at that line. XL froze, I had to kill it.
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,"""")"
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
Damn Dave your good, thats why i always look forward to your responses!
Regards,
simon
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
Yes, it works if I manually put that formula in.
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks