Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Automatic Population of one Column

Hi,
I was wondering if it was possible to automatically populate one
column after one column was filled, say I wanted to put something in
Column A then have a 0 pop up in column C immediately. Is there a
macro/formula to handle this type of operation? Once again, appreciate
the help that has been coming towards my topics and would like to
thank people for any assistance given.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Automatic Population of one Column

Paste this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Target.Columns.Count = 1 Then
Application.EnableEvents = False
Target.Offset(, 2).Value = 0
Application.EnableEvents = True
End If
End Sub

in the code module for the worksheet concerned. Can be reached by
right-clicking on the sheet's tab and choosing 'View Code'. Paste where the
cursor is.
The 2 in Target.Offset(, 2).Value = 0 is 2 columns tothe right of the Target
column, which is column 1, represented by the 1 in If Target.Column = 1

--
p45cal


"Ahh, Excel's Tough" wrote:

Hi,
I was wondering if it was possible to automatically populate one
column after one column was filled, say I wanted to put something in
Column A then have a 0 pop up in column C immediately. Is there a
macro/formula to handle this type of operation? Once again, appreciate
the help that has been coming towards my topics and would like to
thank people for any assistance given.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Automatic Population of one Column

On Jun 26, 5:28 pm, p45cal wrote:
Paste this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Target.Columns.Count = 1 Then
Application.EnableEvents = False
Target.Offset(, 2).Value = 0
Application.EnableEvents = True
End If
End Sub

in the code module for the worksheet concerned. Can be reached by
right-clicking on the sheet's tab and choosing 'View Code'. Paste where the
cursor is.
The 2 in Target.Offset(, 2).Value = 0 is 2 columns tothe right of the Target
column, which is column 1, represented by the 1 in If Target.Column = 1

--
p45cal



"Ahh, Excel's Tough" wrote:
Hi,
I was wondering if it was possible to automatically populate one
column after one column was filled, say I wanted to put something in
Column A then have a 0 pop up in column C immediately. Is there a
macro/formula to handle this type of operation? Once again, appreciate
the help that has been coming towards my topics and would like to
thank people for any assistance given.- Hide quoted text -


- Show quoted text -


Thanks, that works to perfection, however I also have an equation I
want to use involving column B and since the value is being replaced
in column C, the formula automatically clears itself out as soon as I
put something in column A.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Automatic Population of one Column

Just to clarify:You're saying that you have a formula in column C that refers
to column B, and that the formula in Column C is being wiped out by the macro
above?
--
p45cal

Thanks, that works to perfection, however I also have an equation I
want to use involving column B and since the value is being replaced
in column C, the formula automatically clears itself out as soon as I
put something in column A.


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
Automatic Population Zach Excel Discussion (Misc queries) 4 March 15th 07 01:32 PM
Automatic Population? Stacey Excel Worksheet Functions 7 June 8th 06 11:47 PM
Automatic Cell Population EJ Excel Programming 7 May 24th 06 01:52 PM
Automatic cell population MazzyMirsa Excel Discussion (Misc queries) 3 February 9th 06 06:15 PM
Automatic Cell population Ali[_3_] Excel Programming 2 August 4th 04 01:02 PM


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

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

About Us

"It's about Microsoft Excel"