View Single Post
  #8   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default How do I write a formula in Excel

On Wed, 2 Nov 2005 22:06:14 -0800, JMB wrote:

All caps means you are shouting.

Try:
=IF(G4<DATEVALUE("9/18/2005"),VLOOKUP(F4,RATE,2),VLOOKUP(F4,RATE,3))

9/18/2005 is interpreted by Excel as 9 divided by 18 divided by 2005. Read
Excel help for more info on dates and how Excel stores date values.


Due to international date conventions, I prefer to recommend unambiguous
solutions. So I would suggest either a reference to a cell containing the date
9/18/2005; or the DATE worksheet function; or even DATEVALUE("18 SEP 2005").

Your solution will work fine with US style dates (MDY) set as the option in the
Windows regional settings (Control Panel), but won't with other settings (e.g.
DMY).

--ron