+ Reply to Thread
Results 1 to 7 of 7

Delete cell content if find a space in relative cell reference

  1. #1
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Delete cell content if find a space in relative cell reference

    Dear all,

    The Sub below find all the space in column C and delete the cell contents. How can I rewrite it in relative cell reference so that column C deleted when this Sub starts at cell A1, or space in column G deleted when this Sub starts at E1 etc....

    thank you


    Please Login or Register  to view this content.
    Last edited by Leith Ross; 03-04-2015 at 09:14 PM. Reason: Added Code Tagfs

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Delete cell content if find a space in relative cell reference

    I am having a hard time understanding all the parameters you have described. Do you want to delete just the spaces from a string within a cells (i.e. this string to thisstring) or do you want to clear the entire cell if there is any space anywhere? Or are you trying to remove spaces at the front and rear? Or are you trying to remove spaces in a blank cell?

    Also, please clarify your column C, A1, column G, E1. It is not clear.

  3. #3
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: Delete cell content if find a space in relative cell reference

    Thank you for your reply stnkynts.

    1. I want to clear the entire cell.
    2. I want to rewrite the Sub from absolute cell reference to relative cell reference.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Delete cell content if find a space in relative cell reference

    That is about as clear as mud. Could you submit an example workbook with before and after expectations.

  5. #5
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: Delete cell content if find a space in relative cell reference

    Dear stnkynts

    File Attached for your reference.

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Delete cell content if find a space in relative cell reference

    No file. Use "Go Advanced"

  7. #7
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: Delete cell content if find a space in relative cell reference

    File attached please...

    kent
    Attached Files Attached Files

+ 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. [SOLVED] Find rows to delete with a macro based on cell content
    By mkraffert in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-28-2013, 06:27 PM
  2. Macro to sum all space delimited content of a cell?
    By lexluthor in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2010, 08:05 AM
  3. Sorting with relative number by Cell content value
    By excelbaba in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-01-2010, 08:04 PM
  4. [SOLVED] minimizing space between cell content for printing
    By marina in forum Excel General
    Replies: 2
    Last Post: 08-03-2006, 08:35 AM
  5. minimizing space between cell content for printing
    By me in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-02-2006, 05:45 PM

Tags for this Thread

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