Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Numbers with asterisks (Excel xp)

    I am testing some number in a row and they have either an asterisk or a double asterisk attached to them. 33* or 41**. The test, if it's less than or equal to 50, doesn't seem to recognize the numbers because of the asterisks. How do i take them off with vba code? thanks

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Numbers with asterisks (Excel xp)

    Like this:

    Activesheet.UsedRange.Cells.Replace What:="~*", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False

    The tilde character tells Excel to use the next character literally, not take it as a wildcard.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Numbers with asterisks (Excel xp)

    Thank you. that worked perfectly!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •