Share via

SearchFormat And ReplaceFormat Please explain?

Anonymous
2012-12-07T16:08:56+00:00

I have looked and searched but I don't understand exactly what these do can someone explain? I wanted to add it as info in my module incase I needed to use it at some point. Here is what I wrote up so far and the last two I just don't know how to explain it. Thanks!

'***   7) SearchFormat:(Optional) Search cells according to a formatting criteria, like: background color, font color,

'***      font size, font style, etc....

'***         A. = True

'***         B. = False

'***

'***   8) ReplaceFormat:(Optional) The replace format for the method.

'***         A. = True

'***         B. = False

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. HansV 462.6K Reputation points
    2013-09-23T21:19:24+00:00

    If you want to replace . with 0 if . is the entire cell content, you can use

    Range("TotalRange").Replace What:=".", Replacement:="0", LookAt:=xlWhole

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-09-23T20:30:56+00:00

    Sure found it to be a great explanation in respect of format Hans!

    By the way could I use any of such unknown excellent feature to carryout the Find & Replace in respect of VALUES only.

    In other words I actually desire to change the values of cells which are reflecting only periods, i.e. "." with zeros.

    Can I use any of the features of FIND/REPLACE in VBA for the same instead of using a For Each xCell In TotalRange?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-12-07T17:35:14+00:00

    What I just wanted to know was if I use it in a REPLACE FUNCTION then what would they do how would they work if I used them and what what what if.....

    Lets say I wanted to use a ReplaceFormat in my replace function what would I be using it for and how would it be used ? Or what if I used the SearchFormat why would I use it... Would I be replacing lets say bold words with regular font ect.

    Was this answer helpful?

    0 comments No comments