Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 208
Default Automatic Cell Filling

I've done this before but can't remember how i got there.

I have two columns (A and B). I have to enter a date in Column B and this
needs to automatically enter the number 1 into its neighbouring cell in
Column A. For instance if B6 had a date in it then A6 would show the number 1.
Sounds simple but Column A feeds into other spreasheets so if its not filled
in other data will be wrong. By having it filled automatically will hopefully
eliminate human error.

Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Automatic Cell Filling

Put this in A1:

=IF(B1="","",1)

and copy down.

This just checks for the cell being empty, and returns 1 if it isn't,
but of course you could put anything in B1 and it would make A1 show
1. You could change the formula and include an ISNUMBER or ISTEXT
function to disallow text, but the problem with saying that it has to
be a date is that a date is just a number to Excel, so it could not
distinguish between 1234, for example, and 01/01/2008.

Hope this helps.

Pete

On Nov 4, 1:20*pm, Craig wrote:
I've done this before but can't remember how i got there.

I have two columns (A and B). I have to enter a date in Column B and this
needs to automatically enter the number 1 into its neighbouring cell in
Column A. For instance if B6 had a date in it then A6 would show the number 1.
Sounds simple but Column A feeds into other spreasheets so if its not filled
in other data will be wrong. By having it filled automatically will hopefully
eliminate human error.

Thanks for your help


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Automatic Cell Filling

One way is to right click sheet tabview codeinsert this.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 2 Then Exit Sub
If IsDate(Target) Then Target.Offset(, -1) = 1
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Craig" wrote in message
...
I've done this before but can't remember how i got there.

I have two columns (A and B). I have to enter a date in Column B and this
needs to automatically enter the number 1 into its neighbouring cell in
Column A. For instance if B6 had a date in it then A6 would show the
number 1.
Sounds simple but Column A feeds into other spreasheets so if its not
filled
in other data will be wrong. By having it filled automatically will
hopefully
eliminate human error.

Thanks for your help


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 81
Default Automatic Cell Filling

Try
=IF(B6="","",1)
--
Regards
Warren

If this helps please click the Yes button.


"Craig" wrote:

I've done this before but can't remember how i got there.

I have two columns (A and B). I have to enter a date in Column B and this
needs to automatically enter the number 1 into its neighbouring cell in
Column A. For instance if B6 had a date in it then A6 would show the number 1.
Sounds simple but Column A feeds into other spreasheets so if its not filled
in other data will be wrong. By having it filled automatically will hopefully
eliminate human error.

Thanks for your help

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
Pulling a Letter from a cell and filling another cell with info nick s Excel Worksheet Functions 16 November 28th 05 04:10 AM
filling information from one cell and filling another. Dianne Excel Worksheet Functions 1 August 15th 05 08:14 PM
automatic filling in cells in excel CA user Excel Worksheet Functions 2 July 17th 05 03:06 AM
Dragging for automatic filling Hari Excel Discussion (Misc queries) 4 June 17th 05 01:27 PM
filling a cell Terry New Users to Excel 2 February 15th 05 09:16 PM


All times are GMT +1. The time now is 06:00 AM.

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"