Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Force entry into cell, based on validation selection in adjacent cell | Excel Worksheet Functions | |||
Force line break based on text | Excel Discussion (Misc queries) | |||
Force entry in one cell based on value of another cell | Excel Worksheet Functions | |||
How to force a wrap text function when the cell is big enough to p | Excel Discussion (Misc queries) | |||
How can I force certain text formatting in a cell? | Excel Discussion (Misc queries) |