Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi i have a sheet and i want to write some VBA so i can check if some
values are present data is for example A 408 467 410 i want to check if the data in column A is in another list of data, if so call some other function, if not another it all must be checked at once as I will be attaching this to a command button cheers in advance cos I know u guys/girls are helpfull :) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try somtehing like the following (the list to be compared is in column B): sub foo() dim t_rng as range dim cell as range dim s_rng as range Dim ret_value with activesheet set t_rng=.range("B1:B100") set s_rng = .range("A1:A10") end with for each cell in s_rng ret_value=application.countif(t_rng,cell.value) if ret_value0 then exit for end if next if ret_value0 'start one function else 'another function call end if end sub -- Regards Frank Kabel Frankfurt, Germany JayJay wrote: Hi i have a sheet and i want to write some VBA so i can check if some values are present data is for example A 408 467 410 i want to check if the data in column A is in another list of data, if so call some other function, if not another it all must be checked at once as I will be attaching this to a command button cheers in advance cos I know u guys/girls are helpfull :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
copying vba code to a standard code module | Excel Discussion (Misc queries) | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming |