View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
davidoo2005 davidoo2005 is offline
external usenet poster
 
Posts: 4
Default Closest-to function

Is there a VBA function that sorts through a number of cells containing numbers that returns the cell closest to a certain value? For instance, in a column of numbers, I would like to find the cell containing the number closest to 20. The column may or may not contain 20 as a value.