View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Select item in dropdown using VBA

Boss,

For XL2000 onward (split wasn't available in XL97)

Written for the activecell:

ActiveCell.Value = Split(ActiveCell.Validation.Formula1, ",")(3)

Written for a specific cell:

Range("A10").Value = Split(Range("A10").Validation.Formula1, ",")(3)

HTH,
Bernie
MS Excel MVP


"Boss" wrote in message
...
Hi,

I have data validation done in a cell. There are ten items in the dropdown
list.

I wish to write a code which selects the item from dropdown as put it in the
cell.

Please help me with a macro which selects fourth itme in the dropdown and
puts it in the cell.

Thanks!
Boss