fill in blanks

  • Thread starter Thread starter Ra
  • Start date Start date
R

Ra

Hi,

I have a table that has the following structure:

Month Scrap
900
200
2008, October 500
2008, October 400
2008, September 200
100
2008, August 50
500


Any way I can fill in the blanks for the Month in such a way so it reads:

If Scrap is 900, then Month is 2008, October. or
If Scrap is 200, then Month is 2008, October, or
If Scrap is 100, then Month is 2008, September, or
If Scrap is 500, then Month is 2008, August

Any help would be greatly appreciated.

Thank you so much.
 
Hi Ra,

Use the Switch() function.

Switch([Scrap] in (900, 200), "2008, October", [Scrap] = 100, "2008,
September", [Scrap] = 500, "2008, August", True, "some other value when none
of the other match")

But, I would encourage you not to store months in that fashion; that
is, as text. Sorting and searching would be a nightmare. It would be better
to store them in a date field. If you always need only the month and the
year, just always store 1 for the day.

Clifford Bass
 
Back
Top