View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Two parts of the same thing

Hi Dave

To use a worksheet function in vba use this syntax:

Application.WorksheetFunction.Vlookup(....

To copy the value of a cell to several worksheets you can do this.

ValueToCopy=Workdsheets("Sheet1").Range("A1").valu e

Worksheets("Sheet2").range("A1")=ValueToCopy

Hopes it helps

Regards,
Per


"Risky Dave" skrev i meddelelsen
...
Hi,

Within a piece of VBA under Office 2007 on Vista:

1) What is the syntax to use the VlookUp function from within VBA (I want
to
run a macro that looks does a VlookUp and returns the value to the code -
I
do not want to embed formulae within the spreadsheet)?
2) I want to copy the contents of a cell on one page to cells on two other
pages. Is it possible to do this with one command or do I have to
copy-change
page-paste-change back-copy-change to 2nd page-paste- change back?

TIA

Dave