Is it possible to search for a particular format in cells?

  • Thread starter Thread starter Michael Casso
  • Start date Start date
M

Michael Casso

I am in the process of compiling together lots of
analytical data concering metals concentrations in
sediment samples that we send out to various labs for
analysis. For instance, sometimes lab A lists the
percent error of silver as 5.6% by using percent
formatting on a cell with the value .056. Lab B will
list the error as 5.6 with general formatting (which I
prefer). The problem with the first situation is if the
formatting of the cell is ever lost (ie: 5.6%
becomes .056). I eventually compile all of the results
from the various labs onto one giant spreadsheet and in
the process, make everything general format. So, I have
to check each %error value to see how it is formatted.
Thus, I was wondering, is it possible to use the FIND
command or some other command to search my spreadsheet
for cells which are percent formatted? Thanks for any
wisdom you can offer. -- Michael
 
Michael
You can't use the worksheet FIND feature to search for format. You will
need a macro like the one below. First you select the full range of cells
that you want to check (for percent format). Then you run this macro.
Every cell that has a percent format will be colored yellow. This macro
needs to be placed in a regular module. Post back or contact me direct if
you need further help with this. Remove "cobia97" from my email address.
HTH Otto
Sub ColorPercent()
Dim i As Range
For Each i In Selection
If i.NumberFormat = "0.00%" Then _
i.Interior.ColorIndex = 6
Next i
End Sub
 
The standard Edit|Find dialog was enhanced with xl2002 to provide this
functionality.

Click the options button on the dialog and you'll see it (xl2002 or higher,
though).
 
Back
Top