View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Fred Holmes Fred Holmes is offline
external usenet poster
 
Posts: 112
Default Test for formula in cell

Excel 2000

How do I get the following formula:

If ActiveCell.Offset(0, -4).Formula = " *" Then

to test if the formula/value (hard coded) in the cell is of the form

" ####"

(two spaces followed by four of any digits)?

Two spaces followed by anything would be good enough at present. The
above code produces false on " 1234" when I think it ought to produce
true. Is "*" usable as a wild card?

TIA

Fred Holmes