+ Reply to Thread
Results 1 to 3 of 3

Any suggestions for MACRO to continue the Concatenate formula until the last row?

Hybrid View

kshaver Any suggestions for MACRO to... 03-02-2016, 05:01 PM
kshaver Re: Any suggestions for MACRO... 03-02-2016, 05:21 PM
InvisibleMan Re: Any suggestions for MACRO... 03-02-2016, 05:48 PM
  1. #1
    Registered User
    Join Date
    03-02-2016
    Location
    Ontario, Canada
    MS-Off Ver
    2013
    Posts
    4

    Any suggestions for MACRO to continue the Concatenate formula until the last row?

    Hello! In my situation I want to concatenate two columns into a new column (with a slash in between).

    The desired 'starting' active cell would be E2, and the formula entered is =concatenate(I2,"/",J2).

    I am wanting to copy this formula all the way down column E so that it reflects the rest of columns I and J (I3,"/",J3), (I4,"/",J4") etc. The number of entries in the I and J columns will be variable each day, so I need a macro that will copy this formula until the last row of column I.

    The current coding I have is:

    Range("E2").Select
    ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[4],""/"",RC[5])"

    I'm just not sure what to add to continue this formula to the last row of column I. Any suggestions? THANKS!

  2. #2
    Registered User
    Join Date
    03-02-2016
    Location
    Ontario, Canada
    MS-Off Ver
    2013
    Posts
    4

    Re: Any suggestions for MACRO to continue the Concatenate formula until the last row?

    I now have this:

    Range("E2").Select
    ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[4],""/"",RC[5])"

    Dim lrow As Long
    With ActiveSheet
    lrow = .Range("I" & Rows.Count).End(xlUp).Row
    .Range("E2:E" & lrow).FillDown
    End With


    And it seems to be working.

  3. #3
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: Any suggestions for MACRO to continue the Concatenate formula until the last row?

    Please use Code Tags or the Moderators will be on your tail!

    Dim lrow As Long
    With ActiveSheet
         lrow = .Range("I" & .Rows.Count).End(xlUp).Row
         .Range("E2:E" & lrow).FormulaR1C1 = "=CONCATENATE(RC[4],""/"",RC[5])"
    End With

+ 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. Macro and using the CONCATENATE formula
    By Schoom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-21-2015, 01:43 AM
  2. Help - Possible Macro or?? Concatenate + If formula?
    By kbee859 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-23-2014, 10:07 AM
  3. Replies: 2
    Last Post: 02-24-2011, 05:17 PM
  4. CONCATENATE Macro or Formula
    By mgreene in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2010, 09:25 AM
  5. VB Formula error in macro, How to Continue?
    By Mikeco in forum Excel General
    Replies: 7
    Last Post: 04-30-2008, 07:29 PM
  6. Macro concatenate formula
    By vipjun in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2006, 03:47 PM
  7. using the value of a macro variable in a concatenate formula
    By Simon W in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-02-2006, 07:20 AM

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