Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I want to read a list of string-values out of cells (e.g. H2:H8) in Excel into a variable (array) of excel-vba. Is there another possibility to achieve this than reading one value after the other? Then I want to check with a single code-line if a value is part of the array and continue execution depending on the result: if var_test "is part of" var_array then ...... Can anybody tell me how to do this? Thx for your help Oliver |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oliver, try dimming a range, then use .Find
Dim r As Range Dim fRange As Range Set r = Range("H2:H8") Set fRange = r.Find(What:="YourText") 'Add other parameters as neccessary If fRange Is Nothing Then 'Not Found if that doesn't work for you try searching for "Scripting.Dictionary" or check out this post: http://groups.google.com/group/micro...67bb607702 9e Charles Chickering Odido wrote: Hi, I want to read a list of string-values out of cells (e.g. H2:H8) in Excel into a variable (array) of excel-vba. Is there another possibility to achieve this than reading one value after the other? Then I want to check with a single code-line if a value is part of the array and continue execution depending on the result: if var_test "is part of" var_array then ...... Can anybody tell me how to do this? Thx for your help Oliver |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Charles,
wow, thats great - thank you very much. That seems to be exactly what I was looking for. Have a nice day Oliver |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
checking a Cells contents | Excel Programming | |||
checking a Cells contents | Excel Programming | |||
checking a Cells contents | Excel Programming | |||
Checking contents | Excel Programming | |||
Checking contents | Excel Programming |