+ Reply to Thread
Results 1 to 2 of 2

address function into macro

  1. #1
    Registered User
    Join Date
    02-08-2012
    Location
    Finland
    MS-Off Ver
    Excel 2003 and Excel 2010
    Posts
    12

    address function into macro

    Hi,

    How can I add Address function into macro.
    here is a simple macro. How can I replace cell value "G26" for this function "=Address(G17, H17)" so this function will find correct cell value.?

    Sub Macro1()

    '
    Range("D26").Select
    Selection.Copy
    Range("G26").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    ActiveSheet.Paste
    Application.CutCopyMode = False
    End Sub

    Best regards T

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: address function into macro

    Replace:

    Please Login or Register  to view this content.
    With:

    Please Login or Register  to view this content.
    If you wanted to go a step further you could clean out all of the unnecessary selecting, cutting and pasting and replace the code above with just:

    Please Login or Register  to view this content.
    Also, can you use code tags when you post code, please, as per rule 3 of the forum?

+ 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