+ Reply to Thread
Results 1 to 6 of 6

Place a formula into all selected cells?

  1. #1
    Forum Contributor
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    208

    Place a formula into all selected cells?

    I want to be able to select multiple cells (all within the same column if that matters) with the mouse and run a macro that will enter the value of cell a1 into all the selected cells. Is this possible? Thank you!

  2. #2
    Registered User
    Join Date
    01-03-2014
    Location
    Johannesburg South Africa
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Place a formula into all selected cells?

    This Should Help:

    Sub CellA1()
    Range("").Select
    Selection.FormulaR1C1 = "=R[-19]C"
    End Sub

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Place a formula into all selected cells?

    Please Login or Register  to view this content.
    Either of the lines depending upon whether you want a link or just the value
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: Place a formula into all selected cells?

    Awesome! Thank you!

  5. #5
    Forum Contributor
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: Place a formula into all selected cells?

    Since that can be a dangerous button on a worksheet (you can't undo it), is there a way to only allow it to work if the selection is in a certain column? Thanks

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Place a formula into all selected cells?

    In this case column C selected cells only

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 03-21-2013, 02:17 PM
  2. [SOLVED] Formula to place together text from previous 3 cells
    By avidcat in forum Excel General
    Replies: 4
    Last Post: 11-12-2012, 04:15 PM
  3. Textbox values won't place into selected Listbox rows
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-16-2010, 07:34 AM
  4. Place a tick in a cell when selected, untick it if selected again and....
    By hriggs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-14-2009, 09:09 AM
  5. Replies: 1
    Last Post: 10-05-2007, 10:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1