View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default Excel 2007 - How to get cell referrences from dates in combobox

On Sun, 02 Oct 2011 21:49:38 -0700, Wee Willie Winkie wrote:


I have an Excel 2007 spreadsheet named "Weight" that has dates in Column A, weight in Column C,
Blood Pressure in Column D, etc.

The workbook contains another spreadsheet named "Stats" that has 2 combobox's for "StartDate" and
EndDate". These combobox's are populated from a named range ("WeightDates") that returns the dates
from the "Weight" spreadsheet.

I want the user to select a StartDate and EndDate, from the combobox's, that can be used to return a
range of weight values that I can then use to calculate average weight and other stats.

The combobox's return a text value that I can't use for looking up date values.

Question: How can I use these combobox's to return a range that can be used in spreadsheet
functions? E.g. =AVERAGE(hethere)

Thanks

Don


Excel (and VBA) can convert many text values that look like dates into the actual date.

What, exactly, is your combobox returning?

Is it a text value that looks like a date string? Or is it a text value that looks like a serial number?

Either can be converted to an actual date.