+ Reply to Thread
Results 1 to 2 of 2

Search for blanks

  1. #1
    SamanthaK
    Guest

    Search for blanks

    How do you write a macro that:
    1) Searches an Excel-spreadsheet and checks if contents of is cell is numeric.
    2) If content is numeric then search cell for blanks and if blanks are found
    replace them with nothing? E.g. I have a cell containing 55 22 11 and I want
    to replace it with 552211. However I do not want: e.g. 'Market value' to be
    replaced by 'Marketvalue'. Please help me on this one!!!
    --
    I am very thankful for any fast assistance!

  2. #2
    Blue Aardvark
    Guest

    RE: Search for blanks

    You can use the ISNUMERIC function on a cell to check if its a number, then
    use the REPLACE function to replace " " (spaces) with "" (nothing).

    Hope that helps!


    "SamanthaK" wrote:

    > How do you write a macro that:
    > 1) Searches an Excel-spreadsheet and checks if contents of is cell is numeric.
    > 2) If content is numeric then search cell for blanks and if blanks are found
    > replace them with nothing? E.g. I have a cell containing 55 22 11 and I want
    > to replace it with 552211. However I do not want: e.g. 'Market value' to be
    > replaced by 'Marketvalue'. Please help me on this one!!!
    > --
    > I am very thankful for any fast assistance!


+ 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