Automatic filling of cells within a certain date range

Can someone please help, I have been stuck on this for the past two days...

Column 'AB' has 'Start Date' and column 'AD' has 'Finish date'

Row 19, cells 'AI' to 'DW' have the months written as 'J' 'F' 'M' 'A' 
etc.....from 2008 to 2015.

I want to be able to enter a 'start date' in column 'AB' i.e. 1 January 2008 
and a 'Finish date' in column 'AD' i.e. 1 April 2015. Then i would like the 
cells 'J - A' on row 19 to be filled with '1' in each month....

I managed to get it to calculate for only 12 months...

here is what i have so far - 

=IF(AND(COLUMNS($AI32:BB32)>=MONTH($AB32),COLUMNS($AI32:BB32)<=MONTH($AD32)),1,"")

Thanks in advance,

Elor
0
Utf
2/8/2010 2:21:01 PM
excel.worksheet.functions 4936 articles. 2 followers. Follow

1 Replies
1685 Views

Similar Articles

[PageSpeed] 14

      If desired, send your file to my address below. I will only look if:
      1. You send a copy of this message on an inserted sheet
      2. You give me the newsgroup and the subject line
      3. You send a clear explanation of what you want
      4. You send before/after examples and expected results.


-- 
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett@gmail.com
"Elor" <Elor@discussions.microsoft.com> wrote in message 
news:6732199A-0CAF-4E73-9774-845B2D679AE8@microsoft.com...
> Can someone please help, I have been stuck on this for the past two 
> days...
>
> Column 'AB' has 'Start Date' and column 'AD' has 'Finish date'
>
> Row 19, cells 'AI' to 'DW' have the months written as 'J' 'F' 'M' 'A'
> etc.....from 2008 to 2015.
>
> I want to be able to enter a 'start date' in column 'AB' i.e. 1 January 
> 2008
> and a 'Finish date' in column 'AD' i.e. 1 April 2015. Then i would like 
> the
> cells 'J - A' on row 19 to be filled with '1' in each month....
>
> I managed to get it to calculate for only 12 months...
>
> here is what i have so far -
>
> =IF(AND(COLUMNS($AI32:BB32)>=MONTH($AB32),COLUMNS($AI32:BB32)<=MONTH($AD32)),1,"")
>
> Thanks in advance,
>
> Elor 

0
Don
2/8/2010 2:44:56 PM
Reply:

Similar Artilces:

Inserting a date field
How can I insert a date field into an excel cell. I can do it in Word quite easily but for some reason Excel presents more a a challange. R2D2, =TODAY() will give you today's date, is that what you need? -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "R2D2" <someone@microsoft.com> wrote in message news:1HpHg.16195$Ch.11155@clgrps13... > How can I insert a date field into an excel cell. I can do it in Word qu...

Format Cells #9
Is there any way to prevent text from extending into adjacent blank cells? (as the default setting) Hi use 'Format - Cells - alignment' and check 'word wrap' -- Regards Frank Kabel Frankfurt, Germany "KPK" <anonymous@discussions.microsoft.com> schrieb im Newsbeitrag news:130ec01c4434e$26cd8610$a101280a@phx.gbl... > Is there any way to prevent text from extending into > adjacent blank cells? (as the default setting) We actually do not want the text to wrap, we just want it to truncate. Thanks, Kieran >-----Original Message----- >Hi >use &#...

A program is trying to automatically send e-mail on your behalf.
I tried posting this in microsoft.public.outlook.general, but no nibbles. ------------------------------------------------------------------------------------------------------ Does anybody know how to turn the "A program is trying to automatically send e-mail on your behalf." prompte off? It pops when one of my MS Access apps is emailing one of it's reports to somebody. It happens on the Citrix server that one of my MS Apps is running on, but it does not happen when the app is running on my own PC. Consequently I'm hoping for some user-configurable setting that controls...

Automatic CC
Hello, Is there any way to create a template where a contact is automatically CC in the email. So I dont forget to cc them every time I send an email. Thanks ...

Money 2006 constantly faults with automatic updates
Whenever I use the Internet automatic updates, money faults out and wants to send a report to Microsoft. Also my account list shows most accounts with a status of 'Update In Progress' I've done a complete reinstall after removing it and power cycling my machine. I thought it may have been something with removing 2004 and installing 2006, but got same problem Has anyone else been having this problem? I really just want to go back to Money 2004. What's the error message? -- Glyn Simpson, Microsoft MVP - Money http://money.mvps.org Check http://money.mvps.org/faq f...

Counting days between dates
I am trying to calculate working days late or early between two dates using =NETWORKDAYS(A2,B2) If I have a due date of 24 Sept and I ship on 24 Sep then I am neither late or early so I am on time i.e. 0 days - but my formula returns 1! If I have a due date of 24 Sept and I ship on 23 Sep then I am shipping 1 day early i.e. –1 – but my formula returns –2 formula due actual days early late should be 24-Sep 24-Sep 1 0 24-Sep 25-Sep 1 1 24-Sep 23-Sep -2 -1 What do I need to do...

Edit document date on a posted sales document
Our client would like the ability to edit a posted sales documents document date. They indicated they would like security available to the option so that only specified users could change the date. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft...

Automatic axis format
Hi, I'm need to make a automatic axis format within excel. The number of rows is depending of a imported file. No problem to get the max. number of rows. But to put this number into the chart ( category axis) is more problematic. I try VB but my knowledge is at dummy level ! Waiting for your reply............. Hi, Have a look at Jon's examples of dynamic charts. http://peltiertech.com/Excel/Charts/Dynamics.html Cheers Andy jos wrote: > Hi, > I'm need to make a automatic axis format within excel. > The number of rows is depending of a imported file. > No problem to g...

My worksheet automatically adds a fill color when I enter text.
When I type text in a blank cell, the cell automatically is highlightes with the bright yellow fill. There is no conditional formatting on this workbook. Check your VBA editor. You might have an Event Macro which does what, usually, a CF does. Try to Increase the Macro Security to its maximum level in order to eliminate the Event Macro from running... You may, also consider to "rem" all the Macro commands by adding a Preceding apostrophe to each command. Micky > When I type text in a blank cell, the cell automatically is highlightes with > the bright yello...

Date and Time on Reports
How do I print the current/report date and time on reports as well as on receipt templates (POs, PORcv etc)? hi Alex, you can use the formula to translate the time: below is the code for you as example: (timesold is the datetime field) in RMs all transaction date field contain also time. Begin Column FieldName = "TimeSold" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "Time Sold" VBDataType = vbString Formula = "replicate('0',2-len(cast(DatePart(Hh,[Transaction].Time) a...

newbie-pls help me with inserting date into editbox in MFC.
Actually i tried to create an editbox in a dialog and then for the editbox i assigned a member variable m_val4 of type COleDateTime,but in the date editbox i need only the date part as it is obvious but the above gives me both time and Date.Is there something like GetCurrentDate(); This code below m_val4 = COleDateTime::GetCurrentTime(); Gives me 1/27/06 2:14:38 PM What do i do to get Date alone and Time alone.Thanx in advance. There are GetMonth(..), GetDay(...), GetHour(...),GetMinute(...), GetYear(...) GetSecond functions you can call on COleDateTime object after you construct ...

How do I get an automatic equal sign to begin the formula bar?
How do I get an automatic equal sign to appear in the formula bar in Excel for Microsoft 2003? This happened for me in the 2000 version and I could just click on it with my mouse pointer, but now all that appears is the function sign with no equal sign after it. It makes my job a lot more time consuming to have to type in the equal sign while building formulas. Please help, anybody? The = icon disappeared in newer versions of excel (xl2002???). You can add an = icon Tools|customize|commands tab|Insert category (Scroll down the list until you find the = icon) And drag it to your fav...

Fill color
When I open a spread sheet, the menu bar shows the fill color as yellow. When I change it to another color or "no fill" and use it, everything is fine. However, when I close the spread sheet and open it again, the yellow color is shown again. Shouldn't it remain the same until I change it again or select "no fill'? No, that is the way Excel behaves best wishes -- Bernard Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme "Tomg" <Tomg@discussions.microsoft.com> wrote in message news:F8C29B46-221F-49B6-8626-AC4FFA1EF4DF@micr...

Find cell contents in range
Hi, i am really struggling to create a macro to carry out the following. ( i am quite new to this and presently using a book but things are explained fully!) lets say cell K12 = 2245 i have a range of A2:A50 containing a list between 2220 & 2270 i need my macro to look at the value of K12. Find that value in range, and make the cell with that value active so in my list between 2220 & 2270 is an activecell where the value is 2245 i hope this can be done and hope that someone can help me. Regards, Nigel With Worksheets(1).Range("A2:A50") Set cell = .Find(Range(&quo...

I open the MDB, the form runs automatically
Simple question I have an MDB file with 20 files and 7 forms in it. When I open it up, the form runs immediately an access goes into some sort of protected mode. I can't view the tables, queries etc. I can see the code by pressing Alt F11 but not the data. I created a blank db and imported the mdb so I could see the tables. But how do I open the original without it running the code? When I look at the code. I don't see anything that sets properties or invokes the code automatically. There are no macros in this, just the forms and associated code with them. Any ideas Thanks Colm ...

2003 & 2007 Differences in Locking Cells Syntax
The code below runs fine in Excel 2007, but 2003 does not like it. I`m not sure why. It gives me a runtime error and says it is unable to set the Locked property of the range class. I tried commenting out the first line (WS.Cells.Locked = False) and changing the second statement to" WS.Range(Cells(row,col),Cells(row,col)).Locked = True However, this did not help. Does anyone see what I am doing wrong? Thanks, Alan Sub DisableCellInput(WS As Worksheet, row As Long, col As Long) ' ' This subroutine locks and greys out the cell ' WS.Cells.Locked = ...

Automatic updates, automatically disabling itself
Automatic updates, automatically disabling itself. 2nd day now onecare popped up to tell me the updates turned themselves = off. I'm thinking what malware would want to turn the updates off ? Any idea what's going on here ? Did I AUTOMATICALLY install an update = that caused this ? <keepout@yahoo.com.invalid> wrote in message news:8l7mi5tkgp1gd15fkef71ll5mrui9ukmht@4ax.com... > Automatic updates, automatically disabling itself. > > 2nd day now onecare popped up to tell me the updates turned themselves > off. Drop OneCare and install Microsoft Sec...

how to enter a value, and have it SUMMED with the existing cell co
An Excel cell contains, say= 4. How do you enter, say=2, and have the result = 6? (not COPYING and Paste As ...) ...

Cell color change referencing the date in designated cell
HI, How can I have fill color of cell change according to due date. In example, red overdue, green - on time, black complete. Thanks, K Use Conditional Formatting. You'll need to determine what is Overdue, On-time and Complete Read up on the help and come back for specific help Regards Trevor "Klonja" <plunti@yahoo.com> wrote in message news:a18370dd.0401251510.2f990e0f@posting.google.com... > HI, > > How can I have fill color of cell change according to due date. In > example, red overdue, green - on time, black complete. > > Thanks, K Hi Cl...

Use a cell's value as row number for another cell in Excel
Excel XP: I'm trying to use the values in one row of cells (D1:F1) as the reference for the row value for a different series of cells (D2:F4). For example: Column A B C D E F Row 1 1000 30 170 1 2 3 2 1500 60 190 3 1200 20 175 I want to get the following cells to equal: D2=1000 (In other words: D2 = A1); D3=30 (In other words: F2 = B1); E2=1500 (In other words: E2 = A2); E3=60 (In other words: F2 = B2); F2=1200 (In other words: F2 = A3); F3=20 ...

Having numbers automatically appear bold
Hi all, Had such great advise last time, thought I'd try again. I have a large range of cells where I will be inputing sales figures i the form of currency revenue. The range is about G-I and 1-400. Th sales data will be a comparisson of YTD 2001 - 2004 revenue results. What I hope to do is have any figure that is above $30,000 appea automatically in bold so as to stand out as a good client. I gues there is something in the IF function to do this but I'm stumped. Any ideas? Thanks again in advance. Saxte -- Message posted from http://www.ExcelForum.com select the range you wa...

Number with dash is importing as date
An Excel spreadsheet is being exported from a SQL database that I cannot change, so I need to accomplish this in Excel. Sometimes, some of the many numbers contain a dash which Excel then interprets as a date. I can remove the dash programatically, but the number is not correct afterwards. For example, the number imported is 05-9078 which is displayed in Excel as May-78, but is actually stored as 5/1/9078. Changing the cell format to number or text gives me 2621833. I need to be able to add to my macro something that will give me back the original number so that I can remo...

Selecting cell with mouse
Hi, Excel 2000 I have a spreadsheet that allows me to move to cells locked or unlocked with the cursor but doesn't allow me to use the mouse. I'd thought that the range of what could be selected had been restricted using vba but this isn't the case, I've opened the file and disabled vba and still can't select the unlocked cells with the mouse. If I unprotect the worksheet, then all works as expected. I'm at a loss! Any pointed most welcome. Rob I've never seen excel allow you to select a cell with the arrow keys, but not the mouse. My first thought w...

Is it possible to automatically move data entered in columns into rows?
Is it possible to automatically move data entered in columns into rows? It seems like a simple thing to do but I can't find a function anywhere. Cheers, Richard Thorneycroft Husky Products If you enter something in ONE cell it is automatically in a row and a column. So, perhaps a bit more explanation is in order. -- Don Guillett SalesAid Software donaldb@281.com "Richard Thorneycroft" <dancecommander81@hotmail.com> wrote in message news:9e2f3f75.0411160750.7003c6ab@posting.google.com... > Is it possible to automatically move data entered in columns into rows? >...

Automatic Forward
How can I automatically forward messages received from a specific sender to another's e-mail person? Thanks, ...