Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default Indent based on Entry

I'm entering either 'no' or 'yes' in column D. If I enter 'yes' I would like
that text to automatically indent by 1 space (.IndentLevel = 1) so that it
sticks out to me. Please help me you Gods of Excel.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Indent based on Entry

Put the following event code in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("D:D")
Set t = Target
If Intersect(t, r) Is Nothing Then Exit Sub
If t.Value = "yes" Then
t.InsertIndent 1
End If
End Sub

--
Gary''s Student - gsnu200804


"JSnow" wrote:

I'm entering either 'no' or 'yes' in column D. If I enter 'yes' I would like
that text to automatically indent by 1 space (.IndentLevel = 1) so that it
sticks out to me. Please help me you Gods of Excel.

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
restricting entry into a cell based on entry to a previous cell newbie57 New Users to Excel 1 June 9th 08 05:43 PM
Fill a cell based on last entry Amanda Excel Discussion (Misc queries) 3 June 7th 08 06:32 AM
Auto entry of data based on entry of text in another column or fie Judy Rose Excel Discussion (Misc queries) 2 May 21st 08 01:14 PM
cell value based on combo box entry rdwngr23 Excel Worksheet Functions 9 December 18th 07 02:27 PM
Formula based on a cell entry Fat Bastard Excel Discussion (Misc queries) 10 March 13th 05 05:32 AM


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