+ Reply to Thread
Results 1 to 3 of 3

write a macro that changes format of selected cells

  1. #1
    Forum Contributor
    Join Date
    09-19-2004
    Posts
    252

    write a macro that changes format of selected cells

    I need to figure out how to write a macro that will do what Dave Peterson suggests in this link
    http://www.excelforum.com/showthread.php?t=525679
    with whatever cells I select. Any ideas?

  2. #2
    Dave Peterson
    Guest

    Re: write a macro that changes format of selected cells

    Option Explicit
    Sub testme()

    Dim myCell As Range
    Dim myRng As Range
    Dim myArea As Range

    Set myRng = Selection

    Set myCell _
    = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Offset(1, 1)

    myCell.Copy
    For Each myArea In myRng.Areas
    myArea.PasteSpecial Paste:=xlPasteAll, _
    Operation:=xlAdd, SkipBlanks:=False, Transpose:=False
    Next myArea

    Application.CutCopyMode = False
    End Sub


    DKY wrote:
    >
    > I need to figure out how to write a macro that will do what Dave
    > Peterson suggests in this link
    > http://www.excelforum.com/showthread.php?t=525679
    > with whatever cells I select. Any ideas?
    >
    > --
    > DKY
    > ------------------------------------------------------------------------
    > DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515
    > View this thread: http://www.excelforum.com/showthread...hreadid=527715


    --

    Dave Peterson

  3. #3
    Forum Contributor
    Join Date
    09-19-2004
    Posts
    252
    Well, that works... Thanks again Dave!! I appreciate it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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