Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
using match in vba without assigning a cell
I am trying to use the match function to assign a value to a variable.
I do not want to put the match syntax in a cell. I just want the result to be able to be referred to later in an If then statement. I have tried: startbase = Match(begbase, "a:a") but that does not work. Any suggestions would be appreciated. TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
using match in vba without assigning a cell
to use match
sb=application.match -- Don Guillett SalesAid Software "Papa Jonah" wrote in message ... I am trying to use the match function to assign a value to a variable. I do not want to put the match syntax in a cell. I just want the result to be able to be referred to later in an If then statement. I have tried: startbase = Match(begbase, "a:a") but that does not work. Any suggestions would be appreciated. TIA |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
using match in vba without assigning a cell
I am trying this:
sb=application.match(begbase,a2:a20) and not having any success. Did I misunderstand? "Don Guillett" wrote: to use match sb=application.match -- Don Guillett SalesAid Software "Papa Jonah" wrote in message ... I am trying to use the match function to assign a value to a variable. I do not want to put the match syntax in a cell. I just want the result to be able to be referred to later in an If then statement. I have tried: startbase = Match(begbase, "a:a") but that does not work. Any suggestions would be appreciated. TIA |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
using match in vba without assigning a cell
Papa,
Try: sb=application.match(begbase,Range("a2:a20")) HTH, Bernie MS Excel MVP "Papa Jonah" wrote in message ... I am trying this: sb=application.match(begbase,a2:a20) and not having any success. Did I misunderstand? "Don Guillett" wrote: to use match sb=application.match -- Don Guillett SalesAid Software "Papa Jonah" wrote in message ... I am trying to use the match function to assign a value to a variable. I do not want to put the match syntax in a cell. I just want the result to be able to be referred to later in an If then statement. I have tried: startbase = Match(begbase, "a:a") but that does not work. Any suggestions would be appreciated. TIA |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
using match in vba without assigning a cell
dim sb as variant
sb = application.match(begbase,worksheets("sheet1").ran ge("a2:a20")) or for an exact match sb = application.match(begbase,worksheets("sheet1").ran ge("a2:a20"),0) Papa Jonah wrote: I am trying this: sb=application.match(begbase,a2:a20) and not having any success. Did I misunderstand? "Don Guillett" wrote: to use match sb=application.match -- Don Guillett SalesAid Software "Papa Jonah" wrote in message ... I am trying to use the match function to assign a value to a variable. I do not want to put the match syntax in a cell. I just want the result to be able to be referred to later in an If then statement. I have tried: startbase = Match(begbase, "a:a") but that does not work. Any suggestions would be appreciated. TIA -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
using match in vba without assigning a cell
Thanks everyone!
"Dave Peterson" wrote: dim sb as variant sb = application.match(begbase,worksheets("sheet1").ran ge("a2:a20")) or for an exact match sb = application.match(begbase,worksheets("sheet1").ran ge("a2:a20"),0) Papa Jonah wrote: I am trying this: sb=application.match(begbase,a2:a20) and not having any success. Did I misunderstand? "Don Guillett" wrote: to use match sb=application.match -- Don Guillett SalesAid Software "Papa Jonah" wrote in message ... I am trying to use the match function to assign a value to a variable. I do not want to put the match syntax in a cell. I just want the result to be able to be referred to later in an If then statement. I have tried: startbase = Match(begbase, "a:a") but that does not work. Any suggestions would be appreciated. TIA -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding a single word match in a text string and assigning a code | Excel Worksheet Functions | |||
assigning a value to a cell | Excel Worksheet Functions | |||
Assigning a value to a cell from a combox | Excel Discussion (Misc queries) | |||
Assigning a value to an array cell | Excel Programming | |||
Match / Name-assigning To A Range | Excel Programming |