Re: Creating Name with variable

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I got an error in the formula. See if this sorts it

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)"


--
HTH

Bob

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

"Asif" <Asif@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8F4D1DD2-52E9-4EB0-B37A-A1D129682023@xxxxxxxxxxxxxxxx
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" <Asif@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DD017C8C-5959-4B05-AD00-F69AC076EA10@xxxxxxxxxxxxxxxx
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





.



Relevant Pages

  • Re: Cell validation
    ... (there's no email, no snail mail, but somewhere should be gmail in my addy) ... been entered in place of an alphabet. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Creating Name with variable
    ... Thanx & regards, ... (there's no email, no snail mail, but somewhere should be gmail in my addy) ... For numNames = 1 To NamesCount ... sVldName = WorksheetFunction.Index ...
    (microsoft.public.excel.programming)
  • Re: Computer "name"
    ... (there's no email, no snail mail, but somewhere should be gmail in my addy) ... just running the procedure on different machines. ...
    (microsoft.public.excel.programming)
  • Re: Formula to display the winner
    ... Regards ... (there's no email, no snail mail, but somewhere should be gmail in my ... display the corresponding name from column B in another cell. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: How can I this???
    ... (there's no email, no snail mail, but somewhere should be gmail in my addy) ... Best Regards ... Shakeel Ahmad ...
    (microsoft.public.excel)