Results 1 to 3 of 3

How do I make my macro insert/paste code in specific column range?

Threaded View

Rabbitstew How do I make my macro... 07-17-2012, 02:51 PM
efernandes67 Re: How do I make my macro... 07-17-2012, 04:19 PM
Rabbitstew Re: How do I make my macro... 07-17-2012, 04:33 PM
  1. #1
    Registered User
    Join Date
    01-22-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    75

    How do I make my macro insert/paste code in specific column range?

    How do I make my macro insert/paste a specific code?

    For example I want to paste a specific code for range of cells in a column:

    Range("F2").Select
        ActiveSheet.Paste
        Selection.AutoFill Destination:=Range("F2:F296"), Type:=xlFillDefault
    The code I want to paste is:

    =IF(OR(ISNUMBER(SEARCH({"@","/"},E2))),"",IF(ISERROR(RIGHT(RIGHT(E2,3),3-MIN(FIND(0,SUBSTITUTE(RIGHT(E2,3),{1,2,3,4,5,6,7,8,9},0)&0))+1)+0),"",RIGHT(RIGHT(E2,3),3-MIN(FIND(0,SUBSTITUTE(RIGHT(E2,3),{1,2,3,4,5,6,7,8,9},0)&0))+1)+0))
    How do I tie these together so when I run the macro it will automatically paste the code above into specific range in column?

    Thanks in advance!
    Last edited by Rabbitstew; 07-17-2012 at 03:56 PM. Reason: Code tags not quote tags.

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