Macro VBA help?

dwarnimont

Board Regular
Joined
Jan 12, 2010
Messages
71
Looking create a macro that adds a new line WITHIN a cell, Starting by adding the current date, then i add notes

My failed Code resulting from "recording" of keystrokes:
Sub dw()
'
' dw Macro


'
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"10/3/2019-> Lead team to improve with recent suggestions" & Chr(10) & "10/7/2019-> "
Range("J22").Select
End Sub

What is actually needed, steps:
From current cell, F2 edit current cell
Alt+Enter (adds new line)
clt + ; (auto fill with the current date)
"-> " for separator text
Enter.
At this point I'd F2 and begin taking notes on the new line.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
How about:

Code:
Sub dw()

    ActiveCell = ActiveCell & vbCrLf & Date & " -> "
    
End Sub
 
Last edited:
Upvote 0
This suggestion works great. thank you! Cant believe how much time i wasted and now seeing to solution.....so simple
 
Upvote 0
It just takes a bit of experience, and I've been around a long time. Glad it works for you! :cool:
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top