Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default If a specified cell has any text entered in it, this cell will ent

If I want a cell to check to see if another cell has text in it, and then if
it does have text then it enters the date, what formula would I use? I have
part of it figured out:

=IF(ISTEXT(B2), "", "")

What I am missing is: =IF(ISTEXT(B2), "how do I get it to enter the date
here?", "")

I cannot figure out what goes inbetween the fist set of " to get it to enter
today's date. Please help me if possible, I'm going NUTS!. Thank you.

Sara
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default If a specified cell has any text entered in it, this cell will ent

Hi,
try

=IF(ISTEXT(B2),TODAY(), "")

format the cell to read date

"Sara Wiseman" wrote:

If I want a cell to check to see if another cell has text in it, and then if
it does have text then it enters the date, what formula would I use? I have
part of it figured out:

=IF(ISTEXT(B2), "", "")

What I am missing is: =IF(ISTEXT(B2), "how do I get it to enter the date
here?", "")

I cannot figure out what goes inbetween the fist set of " to get it to enter
today's date. Please help me if possible, I'm going NUTS!. Thank you.

Sara

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default If a specified cell has any text entered in it, this cell will ent

Sara,

You need to use an event - either the change or calculate event will work. Copy the code below,
right-click the sheet tab, select "View Code" and paste the code into the window that appears. It
will put the date next to any text entry in column B - the code uses the change event, so it will
work when you enter a value into a single cell in column B.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myDbl As Double
If Target.Cells.Count 1 Then Exit Sub
If Target.Column < 2 Then Exit Sub
On Error GoTo StringEntry
myDbl = CDbl(Target.Value)
GoTo notString
StringEntry:
Application.EnableEvents = False
With Cells(Target.Row, Target.Column + 1)
.Value = Date
.NumberFormat = "mmm dd, yyyy"
End With
Application.EnableEvents = True
Exit Sub
notString:
End Sub

HTH,
Bernie
MS Excel MVP


"Sara Wiseman" <Sara wrote in message
...
If I want a cell to check to see if another cell has text in it, and then if
it does have text then it enters the date, what formula would I use? I have
part of it figured out:

=IF(ISTEXT(B2), "", "")

What I am missing is: =IF(ISTEXT(B2), "how do I get it to enter the date
here?", "")

I cannot figure out what goes inbetween the fist set of " to get it to enter
today's date. Please help me if possible, I'm going NUTS!. Thank you.

Sara



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
Why is my text cell showing as # symbols when entered Podpopper Excel Discussion (Misc queries) 1 November 7th 08 08:11 PM
cell not showing all the text entered? Tom Excel Discussion (Misc queries) 3 January 18th 08 02:01 PM
Duplicate the contents of a row when text is entered in a cell Shonzi Excel Discussion (Misc queries) 10 April 14th 07 04:13 AM
Display Row Borders When Text entered in Any Cell Bilbert Excel Discussion (Misc queries) 4 February 6th 07 03:30 AM
Text shown up in other cells everytime a text is entered in 1 cell bioyyy Excel Discussion (Misc queries) 1 August 26th 05 05:26 PM


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