#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Autofill

Hi,

I am looking for a formula or code to fill in a range of cells with a figure
on the 1st of every month, so when 1st March arrives I need cell C1 to enter
£100 and when 1st April arrives I need cell D2 to £100 and so on for 12
months.

Can anyone help me with this query.

Many thanks


Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Autofill

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.


Private Sub Worksheet_Activate()
If Day(Date) = 1 Then Cells(1, Month(Date)) = 100
End Sub

--
Jacob


"terilad" wrote:

Hi,

I am looking for a formula or code to fill in a range of cells with a figure
on the 1st of every month, so when 1st March arrives I need cell C1 to enter
£100 and when 1st April arrives I need cell D2 to £100 and so on for 12
months.

Can anyone help me with this query.

Many thanks


Mark

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Autofill

Hi Jacob,

This code not doing anything for me, do I have to input cells into the code
so that the cells C1, D1, E1 etc fill in withh the 100 on the ist of every
month?

Many thanks

Mark

"Jacob Skaria" wrote:

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.


Private Sub Worksheet_Activate()
If Day(Date) = 1 Then Cells(1, Month(Date)) = 100
End Sub

--
Jacob


"terilad" wrote:

Hi,

I am looking for a formula or code to fill in a range of cells with a figure
on the 1st of every month, so when 1st March arrives I need cell C1 to enter
£100 and when 1st April arrives I need cell D2 to £100 and so on for 12
months.

Can anyone help me with this query.

Many thanks


Mark

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
autofill Jimmy Excel Discussion (Misc queries) 2 May 31st 06 07:35 PM
Autofill UP - Is this the Best Way? Paige Excel Programming 1 April 26th 06 03:18 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
Autofill last row Duncan_J Excel Programming 3 August 27th 04 11:11 PM
Q. Autofill question: Can I autofill alpha characters like I can numbers? George[_22_] Excel Programming 5 August 7th 04 10:33 AM


All times are GMT +1. The time now is 10:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"