View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JBeaucaire[_131_] JBeaucaire[_131_] is offline
external usenet poster
 
Posts: 96
Default If then else problem

Try this:

==========
Sub TextEqualNegative()
Dim cell As Range, RNG As Range
Set RNG = Columns("B:B").SpecialCells(xlCellTypeConstants, 2)

For Each cell In RNG
Range("C" & cell.Row).Value = -Abs(Range("C" & cell.Row).Value)
Next cell

End Sub
==========

Does that work for you?
--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Legal Learning" wrote:

I think I originally posted this in the wrong category and now realize this
has to be a vba macro situaion. AHHH! This means trouble for me. :)

Here is what I need:

If the any cell in column C has text, then the numeric values in column D
must be negatives. They are currently all postive numbers now. There are
many fields that do not have any text in column C and those numbers must
remain postivie numbers.

Any help is greatly, greatly appreciated.
--
CLG