Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default 2nd Post - Urgently need help on VBA Procedure

Hello,

I have the following hardcoded function in a worksheet:


=IF(ISNA(MATCH(1,('[Option 11 CSV.xls]May'!A1:A10000=20)*('[Option 11
CSV.xls]May'!B1:B10000=6)* ('[Option 11 CSV.xls]May'!C1:C10000="F")*('[Option
11 CSV.xls]May'!E1:E10000="Escada"),0)),0,INDEX('[Option 11
CSV.xls]May'!F1:F10000,MATCH(1,('[Option 11
CSV.xls]May'!A1:A10000=20)*('[Option 11 CSV.xls]May'!B1:B10000=6)*('[Option
11 CSV.xls]May'!C1:C10000="F")*('[Option 11
CSV.xls]May'!E1:E10000="Escada"),0)))


I urgently need to have this function as a VBA procedure, it needs to be
included in an existing VBA macro. Also, the name of file (Option 11
CSV.xls)wil change, so can we have the option of selecting the file to


--
Regards,
Jeff

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 2nd Post - Urgently need help on VBA Procedure

see response in .misc

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"Jeff" wrote in message
...
Hello,

I have the following hardcoded function in a worksheet:


=IF(ISNA(MATCH(1,('[Option 11 CSV.xls]May'!A1:A10000=20)*('[Option 11
CSV.xls]May'!B1:B10000=6)* ('[Option 11

CSV.xls]May'!C1:C10000="F")*('[Option
11 CSV.xls]May'!E1:E10000="Escada"),0)),0,INDEX('[Option 11
CSV.xls]May'!F1:F10000,MATCH(1,('[Option 11
CSV.xls]May'!A1:A10000=20)*('[Option 11

CSV.xls]May'!B1:B10000=6)*('[Option
11 CSV.xls]May'!C1:C10000="F")*('[Option 11
CSV.xls]May'!E1:E10000="Escada"),0)))


I urgently need to have this function as a VBA procedure, it needs to be
included in an existing VBA macro. Also, the name of file (Option 11
CSV.xls)wil change, so can we have the option of selecting the file to


--
Regards,
Jeff



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 2nd Post - Urgently need help on VBA Procedure

can we assume the file will be Open

sName = "'[Option 11 CSV.xls]May'"
sform = "=IF(ISNA(MATCH(1,(XXX!A1:A10000=20)*(XXX!B1:B1000 0=6)*" & _
"(XXX!C1:C10000=""F"")*(XXX!E1:E10000=""Escada""), 0)),0,INDEX(" & _
"XXX!F1:F10000,MATCH(1,(XXX!A1:A10000=20)*(XXX!B1: B10000=6)*" & _
"(XXX!C1:C10000=""F"")*(XXX!E1:E10000=""Escada""), 0)))"
s1 = Replace(sForm,"XXX",sname)

Now s1 contains the formula as a string that can be evaluated or assigned to
the formula property of a cell.

res = Evaluate(s1)

or
ActiveCell.Formula = S1
--
regards,
Tom Ogilvy



"Jeff" wrote:

Hello,

I have the following hardcoded function in a worksheet:


=IF(ISNA(MATCH(1,('[Option 11 CSV.xls]May'!A1:A10000=20)*('[Option 11
CSV.xls]May'!B1:B10000=6)* ('[Option 11 CSV.xls]May'!C1:C10000="F")*('[Option
11 CSV.xls]May'!E1:E10000="Escada"),0)),0,INDEX('[Option 11
CSV.xls]May'!F1:F10000,MATCH(1,('[Option 11
CSV.xls]May'!A1:A10000=20)*('[Option 11 CSV.xls]May'!B1:B10000=6)*('[Option
11 CSV.xls]May'!C1:C10000="F")*('[Option 11
CSV.xls]May'!E1:E10000="Escada"),0)))


I urgently need to have this function as a VBA procedure, it needs to be
included in an existing VBA macro. Also, the name of file (Option 11
CSV.xls)wil change, so can we have the option of selecting the file to


--
Regards,
Jeff

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need your help urgently Calculate Date range Excel Worksheet Functions 1 August 2nd 06 11:25 AM
2nd Post - Urgently need Help on VBA Procedure Jeff Excel Discussion (Misc queries) 1 May 25th 06 05:03 PM
Help Please Urgently, Please Giffy Excel Discussion (Misc queries) 1 September 5th 05 09:44 PM
I need help urgently Brian Excel Programming 4 September 20th 03 11:38 AM


All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"