Two parts of the same thing
Hi.
Q1
lookupval = Range("C1")
lookuparray = Range("A1:B10")
myvalue = Application.WorksheetFunction.VLookup(lookupval, lookuparray, 2,
False)
Q2
It can be done with changin sheets
Sheets("sheet2").Range("A1").Value = Sheets("Sheet1").Range("A1").Value
Sheets("sheet2").Range("B1").Value = Sheets("Sheet1").Range("A1").Value
Mike
"Risky Dave" wrote:
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
|