Archive of Mr Excel Message Board


Back to Forms in Excel VBA archive index
Back to archive home

&'s and ":"'s and ","

Posted by paige on February 02, 2001 4:59 AM
i want to set the cell (Wdcount, Wdcol) to be the formula MOYENNE (this is average in french excel) of cells from (startmonth, Wdcol) to (copywdcount, Wdcol)
I am getting an error tho and i think it is the various "",,,&&&. i do not have a good reference to know what the syntax should be.

thanks in advance

Worksheets("Sheet1").Cells(Wdcount, Wdcol).Formula = " =MOYENNE(startmonth,Wdcol & : & copywdcount, Wdcol )"


Check out our Excel Resources

Re: &'s and ":"'s and ","

Posted by Gregc on February 02, 2001 8:06 AM

Try this
Worksheets("Sheet1").Cells(Wdcount, Wdcol).Formula = "=MOYENNE(startmonth,Wdcol" & ":" & "copywdcount, Wdcol )"


Re: &'s and ":"'s and ","

Posted by Tim Francis-Wright on February 02, 2001 1:24 PM

I don't think that will work. Try this (tested en Anglais) --

Worksheets("Sheet1").Cells(Wdcount,Wdcol).Formula = "=MOYENNE(" & Cells(startmonth,Wdcol).address & ":" & cells(copywdcount, Wdcol).address & ")"

Good luck!


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.