+ Reply to Thread
Results 1 to 2 of 2

Changing negative value to positive

  1. #1
    Registered User
    Join Date
    07-15-2006
    Posts
    43

    Question Changing negative value to positive

    Hi,

    I'm trying to change a cell value from negative to positive in VBA. I tried different variations, but can't seem to get the syntax right.

    If Range("C24") < 0 Then
    Range("C24") = (Cell.Value * -1)

    Any help would be appreciated.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Range("C24") = Range("c24").Value * -1 works

    In your code you have used Cell.Value, What is the address of the Cell???

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1