View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Asif Asif is offline
external usenet poster
 
Posts: 37
Default Creating Name with variable

Here are the definitions of variables:

Dim vldFormula As String, sVldName As String

sVldName = WorksheetFunction.Index(vldNames, numNames, 0)

vldFormula = "=OFFSET(Data!$B$2,MATCH(Data!$I$" & numNames + 2 & _
",Data!$B$3:$B$65536,0),3,COUNTIF(Data!$B$B,Data!$ I$" &
numNames + 2 & "),1)"

--
Thanx & regards,
Asif


"Bob Phillips" wrote:

What is in vldName and vldFormula?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Asif" wrote in message
...
Hi there,

I am trying to create Names with the following statement:

ActiveWorkbook.Names.Add Name:="vld" & sVldName, RefersTo:=vldFormula

I keep getting the runtime error 1004. I will appreciate if somebody would
help me getting round this probelm.

--
Thanx & regards,
Asif