+ Reply to Thread
Results 1 to 5 of 5

Change sign value based on other cell value

  1. #1
    Forum Contributor
    Join Date
    04-22-2016
    Location
    Philippines
    MS-Off Ver
    2016 & Office365
    Posts
    139

    Post Change sign value based on other cell value

    Good day...

    Help me please...


    A6:A9999 value = DEBIT or CREDIT
    B6:B9999 value = Amount

    if i change any value from A6:A9999
    ex:
    A6 = CREDIT
    A10 = DEBIT

    then it will change the amount sign of B6:B9999
    ex:
    B6 = -1,000.00
    B10 = 5,000.00

    Thanks...

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,937

    Re: Change sign value based on other cell value

    Here is a worksheet change event

    Option Explicit

    Please Login or Register  to view this content.
    Open your VBE (Alt + F11), double click in the left window on the sheet you will be updating
    Copy the above code and place it in the right window when it opens.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: Change sign value based on other cell value

    This could work using a worksheet_change event

    Place this code in the worksheet module

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    04-22-2016
    Location
    Philippines
    MS-Off Ver
    2016 & Office365
    Posts
    139

    Re: Change sign value based on other cell value

    Thank you guys... working great...
    can you add also just in case column A value already filled with DEBIT or CREDIT then
    if I type amount either negative or not then amount sign will automatically change
    also based on column A value (vice versa)

  5. #5
    Forum Contributor
    Join Date
    04-22-2016
    Location
    Philippines
    MS-Off Ver
    2016 & Office365
    Posts
    139

    Re: Change sign value based on other cell value

    Sir alansidman, it's work for one time changes only, but if I change it again the value in column A it didn't match
    the amount sign

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Change the positive sign to negative sign in Pivot Table
    By jackson_hollon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2020, 05:50 PM
  2. [SOLVED] Formula:add degree sign min sign and sec sign to a cell
    By khanaran in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-13-2020, 04:10 PM
  3. Replies: 2
    Last Post: 10-26-2018, 10:03 AM
  4. Create a formula based on a mathematical sign from another cell
    By buhaj47 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2018, 07:53 AM
  5. Change sign of number based on validation drop down in another column
    By stoughc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2014, 11:33 AM
  6. Reversing Sign Based on Cell being Manually Coloured
    By NBVC in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-13-2008, 05:00 PM
  7. [SOLVED] how to change cell sign and values
    By me in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2005, 04:06 PM

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