View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default Using a date range in a formula to pull info to the correct column

Hi Tricia

If you use date in row 1 as column headings from B1 onward like
C1= 1/1/07, D1 =2/1/07 etc. and then format theses cells with
FormatCellsNumberCustom mmm
they will show as Jan, Feb, Mar etc.

Then in C2
=IF(MONTH($B2)=MONTH(C$1),$A2,"")
Copy across and down as necessary

--
Regards

Roger Govier


"Tricia" wrote in message
...
I have a spreadsheet set up with a column (a) with cost; (b) bill date
and 12
columns for each month. I need a formula that will pull (a)the cost
into the
correct month column based upon (b)the bill date which would be within
the
range 1/1/07-1/31/07, etc for each month.
I tried so many different formulas but non seem to work...
=if (b) =1/1/07&1/31/07, (a),0