View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
transferxxx transferxxx is offline
external usenet poster
 
Posts: 11
Default If a cell equals then macro

Can someone pls correct my code or give me the correct macro as I'm new to
excel
thxs

"Niek Otten" wrote:

Look he

http://www.cpearson.com/excel/Events.aspx

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"transferxxx" wrote in message ...
|I have a table with letters "C" or "D" in column G starting G2 & numbers in
| column H. I would like the number in a cell to be negative if cell next to it
| in column G = "c"
| This would apply to all numbers in column starting from H2
| The macro below has to be corrected
| Sub neg()
| If ActiveCell.Offset(0, -1) = "c" Then
| ActiveCell.Value = -ActiveCell.Value
| End If
| End Sub
|
| Pls help