Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2014, 01:19 AM
Morte Morte is offline Macro to insert Text Windows 7 64bit Macro to insert Text Office 2010 64bit
Novice
Macro to insert Text
 
Join Date: Mar 2014
Posts: 1
Morte is on a distinguished road
Default Macro to insert Text

Hello I'm new to boards and for work I'm trying to find a way where my workers can click on a button and it will insert whatever text i program for that button at the end of the Excel spreadsheet is this possible.

Example Say i have Data From A1-A10 and they click the button i want it to Insert Text "Dept 7" Maybe Bold and background color set to it at A11.

Thanks for any help or advice.
Reply With Quote
  #2  
Old 03-04-2014, 04:33 PM
macropod's Avatar
macropod macropod is offline Macro to insert Text Windows 7 32bit Macro to insert Text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Try a macro coded along the lines of:
Code:
Sub AddDept()
With ActiveSheet
  With .Range("A" & .Cells.SpecialCells(xlCellTypeLastCell).Row + 1)
    .Value = "Dept 7"
    With .Font
      .Bold = True
      .ColorIndex = 3
    End With
    .Interior.ColorIndex = 6
  End With
End With
End Sub
You could simply assign a shortcut key to the macro, without the need for a button.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to insert Text VBA code for Microsoft Word macro — select text and insert footnote ndnd Word VBA 10 01-06-2015 01:47 PM
Macro to insert Text Macro to insert picture in footer Sharon Word 5 01-29-2013 03:12 AM
Macro to insert new page... samanthaj Word 17 01-31-2012 01:53 PM
Macro to Insert Text Into Cells Having Multiple Lines revans611 Excel Programming 4 10-24-2011 10:15 AM
Macro to insert Text Macro for Picture Insert rfhall50 Word VBA 2 10-25-2010 12:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:40 AM.


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