Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-03-2015, 03:19 AM
macropod's Avatar
macropod macropod is offline Insert formula programatically Windows 7 64bit Insert formula programatically Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Is there a reason for not using something like:
=TEXT(DATEVALUE(TEXT(B1,"0000-00-00")),"MMM DD, YYYY")&": "&C1
in column D?

For example:
Code:
Sub Demo()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim i As Long
With ThisWorkbook.Worksheets("Sheet1").UsedRange
  For i = 1 To .Cells.SpecialCells(xlCellTypeLastCell).Row
    .Cells(i, 4).Value = "=TEXT(DATEVALUE(TEXT(B" & i & "," & _
      Chr(34) & "0000-00-00" & Chr(34) & "))," & Chr(34) & _
      "MMM DD, YYYY" & Chr(34) & ")&" & Chr(34) & ": " & Chr(34) & "&C" & i
  Next
End With
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert formula programatically Removing add in programatically chrismad Word VBA 4 05-14-2014 02:56 PM
How do I send an email programatically? macroscope Outlook 7 02-01-2013 02:27 PM
Insert the content of a cell into formula? chaghrie Excel 3 08-27-2012 05:22 AM
Insert formula programatically Sorting or an Excel formula to insert a blank row after ending a series. PRADEEPB270 Excel 1 09-07-2011 02:33 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft