Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with MATCH function
Hi,
i try to use match to search some value. When i run it, excel displays an error 13 : type mismatch. Here is my code: Set rngCrit1 = ThisWorkbook.Sheets("Backup").Range("G1:G65536") Set rngCrit2 = ThisWorkbook.Sheets("Backup").Range("H1:H65536") Set rngCrit3 = ThisWorkbook.Sheets("Backup").Range("K1:K65536") Dim varTest As Variant varTest = WorksheetFunction.Match(ThisWorkbook.Sheets("Progr ams").Range("G" & iCounter).Value & ThisWorkbook.Sheets("Programs").Range("H" & iCounter).Value & ThisWorkbook.Sheets("Programs").Range("K" & iCounter).Value, rngCrit1 & rngCrit2 & rngCrit3, 0) i do not understand where is the problem. please, could you help me ? thx, Maileen |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with MATCH function
You are trying to match a concatenation of three cells with 3 ranges
(Columns); match works on one column only. Can you explain what you are trying to do in your code. If your search values are 1,2 and 3 I ssume you looking for 1 in column G, 2 in H and 3 in K? "Maileen" wrote: Hi, i try to use match to search some value. When i run it, excel displays an error 13 : type mismatch. Here is my code: Set rngCrit1 = ThisWorkbook.Sheets("Backup").Range("G1:G65536") Set rngCrit2 = ThisWorkbook.Sheets("Backup").Range("H1:H65536") Set rngCrit3 = ThisWorkbook.Sheets("Backup").Range("K1:K65536") Dim varTest As Variant varTest = WorksheetFunction.Match(ThisWorkbook.Sheets("Progr ams").Range("G" & iCounter).Value & ThisWorkbook.Sheets("Programs").Range("H" & iCounter).Value & ThisWorkbook.Sheets("Programs").Range("K" & iCounter).Value, rngCrit1 & rngCrit2 & rngCrit3, 0) i do not understand where is the problem. please, could you help me ? thx, Maileen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with MATCH function | Excel Discussion (Misc queries) | |||
Problem with using match function | Excel Worksheet Functions | |||
Match function problem | Excel Worksheet Functions | |||
MATCH function problem | Excel Discussion (Misc queries) | |||
Problem with match function | Excel Discussion (Misc queries) |