LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Match function in VBA

Many thanks. I tried the three double quotes,but it didn't work perhaps
because of not giving a space between "&" and the variable name. Now it is
working. Thanks once again for being patient with me.

--
esbee


"Equiangular" wrote:

I'm sorry for the late reply.

The corrected code is like this:

Range("q2").FormulaArray = "=MATCH(1, (L1:L" & my_last_row & " =
""Sep"")" & _
" * (K1:K" & my_last_row & " = """ & game_name & """)" & _
"* (D1:D" & my_last_row & " = """ & position & """)" & _
" * (A1:A" & my_last_row &" < 1), 0)"

You should add a space between the variable name and &.
To use quote in a string you need to use two consecutive quotes "".

esbee wrote:
I am sorry I couldn't make any headway. I tried to replace "Cricket" by
variable name "game_name" and "Off " by the variable "Position". I get error
messages such as syntax error or expected:end of statement or unable to enter
formulaArray in range class etc., when I tried to tinker with the code' "&"
and "" signs. The code is like this. Can you help me ?

Range("q2").FormulaArray = "=MATCH(1, (L1:L" & my_last_row & " =
""Sep"")" & _
" * (K1:K" & my_last_row & = &game_name&) & _
"* (D1:D" & my_last_row & " = &postiion&)" & _
" * (A1:A" & my_last_row &" < 1), 0)"




 
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
find the second match using the match function Ray Excel Worksheet Functions 1 April 6th 09 10:19 PM
how can we get unique values in match function for same match key. Xcel[_2_] Excel Worksheet Functions 11 December 7th 07 08:13 PM
index match array function-returning only first match, need last. Julie Olsen Excel Worksheet Functions 3 December 29th 06 12:50 AM
Match as well as does not match array function Vikram Dhemare Excel Discussion (Misc queries) 7 April 25th 06 09:15 AM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM


All times are GMT +1. The time now is 07:25 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"