Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default AUTO FILL ADJACENT CELL WITH SPECIFIED VALUE


A simple if statement can suffice for your wording like:
=IF(AND(A1<"",B1="Yes"),"Ok","") so this formula says if the cell A1 is
not blank and the cell B1 contains the word Yes then display the word
Ok.

Does this help?


--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=36374

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default AUTO FILL ADJACENT CELL WITH SPECIFIED VALUE

On Dec 3, 5:02*pm, The Code Cage Team <The.Code.Cage.Team.
wrote:
A simple if statement can suffice for your wording like:
=IF(AND(A1<"",B1="Yes"),"Ok","") so this formula says if the cell A1 is
not blank and the cell B1 contains the word Yes then display the word
Ok.

Does this help?

--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile:http://www.thecodecage.com/forumz/member.php?userid=2
View this thread:http://www.thecodecage.com/forumz/sh...ad.php?t=36374


thanks.
Well yes but as I would go down the sheet, it would increase
calculation time & make it slow since formulas are involved.
I guess a code will definitely speed up the required.

Thx.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default AUTO FILL ADJACENT CELL WITH SPECIFIED VALUE


Formulae won't make it slow unless you haev 1000's of them, anyway
here's some code you can play around with!


Code:
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Target.Column = 1 Or Target.Address = "$B$1" Then Exit Sub
If Not Intersect(Target, Range("B:B")) Is Nothing Then
If Target < "" And Target.Offset(0, -1) = "" Then
MsgBox "You cannot leave " & Target.Offset(0, -1).Address & " empty!", vbOKOnly, "Missing Data"
Target.ClearContents
NXT:
Target.Offset(0, 1).ClearContents
Target.Offset(0, 2).ClearContents
Target.Offset(0, 5).ClearContents
Target.Offset(0, -1).Select
Exit Sub
ElseIf Target = "" Then
GoTo NXT
ElseIf Not Intersect(Target, Range("B:B")) Is Nothing Then
If Target < "" Then
Target.Offset(0, 1).Value = "Ok"
Target.Offset(0, 2).Value = "Clear"
Target.Offset(0, 5).Value = "Done"
End If
End If
End If
End Sub
--------------------


--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=36374

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default AUTO FILL ADJACENT CELL WITH SPECIFIED VALUE

On Dec 3, 8:08*pm, The Code Cage Team <The.Code.Cage.Team.
wrote:
Formulae won't make it slow unless you haev 1000's of them, anyway
here's some code you can play around with!

Code:
--------------------
* * Private Sub Worksheet_Change(ByVal Target As Range)
* If Target.Cells.Count 1 Then Exit Sub
* If Target.Column = 1 Or Target.Address = "$B$1" Then Exit Sub
* If Not Intersect(Target, Range("B:B")) Is Nothing Then
* If Target < "" And Target.Offset(0, -1) = "" Then
* MsgBox "You cannot leave " & Target.Offset(0, -1).Address & " empty!", vbOKOnly, "Missing Data"
* Target.ClearContents
* NXT:
* Target.Offset(0, 1).ClearContents
* Target.Offset(0, 2).ClearContents
* Target.Offset(0, 5).ClearContents
* Target.Offset(0, -1).Select
* Exit Sub
* ElseIf Target = "" Then
* GoTo NXT
* ElseIf Not Intersect(Target, Range("B:B")) Is Nothing Then
* If Target < "" Then
* Target.Offset(0, 1).Value = "Ok"
* Target.Offset(0, 2).Value = "Clear"
* Target.Offset(0, 5).Value = "Done"
* End If
* End If
* End If
* End Sub
--------------------

--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile:http://www.thecodecage.com/forumz/member.php?userid=2
View this thread:http://www.thecodecage.com/forumz/sh...ad.php?t=36374


Hi,

In same code, how will I be able to import a specific column (in my
case it is column 6 of text file) to column 2 in xl sheet.
Text file is '|' delimited and first row has header. It should ignore
the header of text file & import column 6 data to column 2 in xl sheet
& rest autofill is already mentioned in the above code.

If all works fine, then the result would be like:
column 2 having data (previously we were enterting value, now we will
import from text file a specific column)
(same row) column 3, column4 & column 7 with OK, CLEAR & DONE (same as
in code)

Thx.

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
fill in date into adjacent cell automatically FS Excel Discussion (Misc queries) 2 March 25th 10 09:27 PM
Auto fill adjacent cells KenM Excel Discussion (Misc queries) 3 November 21st 08 02:29 AM
Auto fill Adjacent cells Simon Blackburn Excel Worksheet Functions 7 September 27th 07 04:50 PM
auto fill series between to non-adjacent cells Manster Excel Discussion (Misc queries) 1 June 3rd 07 11:09 AM
Auto-fill cell based on adjacent cell information.. sans Excel Worksheet Functions 1 October 17th 05 11:38 PM


All times are GMT +1. The time now is 05:57 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"