+ Reply to Thread
Results 1 to 5 of 5

Function only works for column A. How to adjust for other columns in a sheet?

  1. #1
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    Function only works for column A. How to adjust for other columns in a sheet?

    Hi,

    A forum contributor gave me this macro which works perfectly. It shows the substring after the last "/" in the string.
    This function works for column A. I would like this formula to work for other columns as well. I changed "A2" for "W2" but it doesn't work. How can i adjust this function to work for example for column W?



    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Function only works for column A. How to adjust for other columns in a sheet?

    Hoi Maarten
    If you change everything that realates to the first Column (A or 1), as you partially did, you're in business.
    Please Login or Register  to view this content.
    en
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    Re: Function only works for column A. How to adjust for other columns in a sheet?

    Thank you for your input. I applied the changes. Somehow i get a runtime error 13: types mismatch.
    How can i solve this?

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Function only works for column A. How to adjust for other columns in a sheet?

    Can you try this in the meantime?

    If there are possible different Columns at times, this might fit you better.
    Just select a cell in the column that you want to run the macro on with your mouse when asked.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Function only works for column A. How to adjust for other columns in a sheet?

    In Post #1 you have a backslash ("\") and now you have a period ("."). Is that right?
    Do you have data in Column W?

    It's getting late here so if no one else jumps in, I'll have to check again after my beauty sleep.

+ 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. I have a code that works but how can I adjust it to activate for a different row?
    By cheeseleweese in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-31-2020, 01:34 PM
  2. Help to understand how this formula works so I can adjust it?!
    By Treebeardz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-14-2017, 03:43 PM
  3. [SOLVED] index match formula won't fill across columns or adjust if column is deleted
    By duvius in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-29-2015, 11:57 AM
  4. Replies: 1
    Last Post: 07-31-2013, 07:58 AM
  5. [SOLVED] Auto Adjust Stacked Column Need to Adjust Legend
    By tbren in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 03-29-2013, 01:56 PM
  6. Replies: 0
    Last Post: 11-08-2012, 05:05 PM
  7. How do you adjust the macro so it works on the selected row?
    By Jlosness in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-08-2011, 12:01 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