Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Change date formula to Value

I have a spreadsheet to record serial numbers already populated in column A
and the date the specific serial number was issued. The issuer puts a code
in column C which automatically assigns a date in column E and some location
details in columns F to H. What I need to do is run a macro which saves the
file but changes column E to a value if column C is not blank. Column C can
have gaps between rows.

Any ideas would be greatly appreciated

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Change date formula to Value

why don't you use a worksheet_Change function that when a date is entered in
column c todays date is automatically enetered in column E.

Sub worksheet_change(ByVal Target As Range)

For Each cell In Target
If cell.Column = 3 Then
cell.Offset(0, 2) = Date
End If

Next cell

End Sub


"Michael" wrote:

I have a spreadsheet to record serial numbers already populated in column A
and the date the specific serial number was issued. The issuer puts a code
in column C which automatically assigns a date in column E and some location
details in columns F to H. What I need to do is run a macro which saves the
file but changes column E to a value if column C is not blank. Column C can
have gaps between rows.

Any ideas would be greatly appreciated

Michael

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Change date formula to Value

Michael
This little macro will do that. HTH Otto
Sub EValue()
Dim rColC As Range
Dim i As Range
Set rColC = Range("C2", Range("C" & Rows.Count).End(xlUp))
For Each i In rColC
If Not IsEmpty(i.Value) Then
i.Offset(, 2).Copy
i.Offset(, 2).PasteSpecial xlPasteValues
End If
Next i
End Sub
"Michael" wrote in message
...
I have a spreadsheet to record serial numbers already populated in column A
and the date the specific serial number was issued. The issuer puts a
code
in column C which automatically assigns a date in column E and some
location
details in columns F to H. What I need to do is run a macro which saves
the
file but changes column E to a value if column C is not blank. Column C
can
have gaps between rows.

Any ideas would be greatly appreciated

Michael



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
Formula to change date to reduce bal ern New Users to Excel 3 December 29th 07 05:39 PM
what is the formula to change date of birth into age Eddie Excel Discussion (Misc queries) 6 May 16th 07 01:56 PM
How do i change the date formula cymo Setting up and Configuration of Excel 2 September 12th 06 11:28 PM
I need a formula that change all date by putting in one date [email protected] Excel Worksheet Functions 2 August 7th 06 04:22 PM
Help: Can I change the date formula from mm/dd/yyyy to "mmm-yy" et wintersunshine Excel Discussion (Misc queries) 7 July 5th 05 09:44 PM


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