Range("E1:e" & i).Formula = "=$A$" & i - 1 & " - " & "$B$" & i - 1 ' *Does
work*

On Fri, Feb 25, 2011 at 4:47 AM, Nasim <nbeiz...@gmail.com> wrote:

> Hi,
>
> I am trying to enter the folowing formula in cells but whatever I do I
> can not make the "-" part work and it just enters a dash in the cell:
> i tries chr(34) & "-" & chr(34) and it did not work either.
>
> I need range(E2)= $A$1 & " - " & $B$1
>
> .Range("E" & i).Formula = "=$A$" & (i - 1) & " & " & " - " & "$B$" &
> (i - 1)  ' Does not work
>
> .Range("E" & i).Formula = "=$A$" & (i - 1) & " & " & Chr(34) & " - " &
> Chr(34) & "$B$" & (i - 1)  ' Does not work
>
> I appreciate your help.
>
> Thanks,
>
> Nasim
>
> --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>



-- 
  Rakesh kumar khowal
 +91 9540084660
 +91 9868532105

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to