LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default force text in a cell based on value of cell in a range


Hello all.. new to this board, thx in advance for any help.. Here is
what I'm trying to do. I'd like a piece of code that says the
following. If any cell in a specific range is < 0 and the cell 7
columns before it, same row (the title of this cell is "description",
is blank, i'd like a message box to come up telling the user they need
to enter a description in that cell. Here is what I have so far.. I am
sorta new to this VBA stuff, so if I'm way off, sorry...

Private Sub worksheet_change(ByVal Target As Excel.Range)

Dim result As Range
For Each result In Range("FY04_reduction_totals")
If result < 0 & result.Offset(0, 7) = "" Then
MsgBox ("please enter a description")
End If
End Sub


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
 
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
Force entry into cell, based on validation selection in adjacent cell Richhall[_2_] Excel Worksheet Functions 3 June 18th 09 10:28 AM
Force line break based on text Quizologist Excel Discussion (Misc queries) 3 June 4th 08 05:46 PM
Force entry in one cell based on value of another cell Kebbon Excel Worksheet Functions 3 August 16th 07 09:52 PM
How to force a wrap text function when the cell is big enough to p Jason Bathon Excel Discussion (Misc queries) 1 April 13th 05 03:21 PM
How can I force certain text formatting in a cell? eddied Excel Discussion (Misc queries) 2 February 7th 05 12:55 PM


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