+ Reply to Thread
Results 1 to 15 of 15

VBA: Cell displays certain value and is black, but if I override that, it's red Excel 2003

  1. #1
    Registered User
    Join Date
    07-13-2015
    Location
    United States
    MS-Off Ver
    2003
    Posts
    62

    VBA: Cell displays certain value and is black, but if I override that, it's red Excel 2003

    I have a sheet displaying some water quality values, and for most of the cells I have the numbers displaying a calculated value. But once in a while I actually measure the value, and type in the measured, rather than calculated, number in the cell. I'd like the cells to automatically display the number as black when it is pointing to the calculation, but red when I type the number in. How can I do this?

    Thanks!
    Sean
    Last edited by AliGW; 02-12-2018 at 06:52 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: How to do this: Cell displays certain value and is black, but if I override that, it's

    Use conditional formatting on the range.

    Assuming that A1 is the start of the range where the CF rule needs applying:

    =ISFORMULA(A1)=FALSE

    Set this to red text.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: How to do this: Cell displays certain value and is black, but if I override that, it's

    Sorry - just realised you only have 2003, so this won't work. You will need VBA to do it.

  4. #4
    Registered User
    Join Date
    07-13-2015
    Location
    United States
    MS-Off Ver
    2003
    Posts
    62

    Re: How to do this: Cell displays certain value and is black, but if I override that, it's

    Hi AliGW,

    I do have conditional formatting on my version of excel. Are you sure it shouldn't work?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: How to do this: Cell displays certain value and is black, but if I override that, it's

    It's the function (ISFORMULA) that won't work - sorry. It's a relatively new addition to the software.

  6. #6
    Registered User
    Join Date
    07-13-2015
    Location
    United States
    MS-Off Ver
    2003
    Posts
    62

    Re: How to do this: Cell displays certain value and is black, but if I override that, it's

    Hmm.. So do you know how I should go about doing it then?

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: How to do this: Cell displays certain value and is black, but if I override that, it's

    No, sorry - I don't do VBA. I'll move your thread to that section to attract the attention of someone who can help.

  8. #8
    Registered User
    Join Date
    07-13-2015
    Location
    United States
    MS-Off Ver
    2003
    Posts
    62

    Re: How to do this: Cell displays certain value and is black, but if I override that, it's

    Thanks a lot!

  9. #9
    Registered User
    Join Date
    11-30-2008
    Location
    Spain
    MS-Off Ver
    2016
    Posts
    11

    Re: VBA: Cell displays certain value and is black, but if I override that, it's red Excel

    This is another possibility without VBA that I hope it works in Excel 20013
    Try this formula:
    =ESERROR(ENCONTRAR("=";FORMULATEXTO(A1);1))

    In English probably is
    =ISERROR(FIND("=";FORMULATEXT(A1);1))

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: VBA: Cell displays certain value and is black, but if I override that, it's red Excel

    No, that won't work, either. You can easily check online by Googling the function name:

    https://support.office.com/en-us/art...e-09cda35439c8

  11. #11
    Registered User
    Join Date
    11-30-2008
    Location
    Spain
    MS-Off Ver
    2016
    Posts
    11

    Re: VBA: Cell displays certain value and is black, but if I override that, it's red Excel

    Sorry, I was not aware that FormulaText function did not work in Excel 2003
    In that case try adding a module to your workbook with this code:
    Please Login or Register  to view this content.
    Then, you can use the function in a cell this way:
    =IsFormula(A1)

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: VBA: Cell displays certain value and is black, but if I override that, it's red Excel

    The function needs to be used in a conditional formatting rule - will that work?

  13. #13
    Forum Contributor
    Join Date
    01-03-2018
    Location
    Fukuoka, Japan
    MS-Off Ver
    Excel 2013
    Posts
    123

    Re: VBA: Cell displays certain value and is black, but if I override that, it's red Excel

    I believe this UDF will work.

    Please Login or Register  to view this content.
    Last edited by yujin; 02-12-2018 at 08:39 AM.

  14. #14
    Registered User
    Join Date
    07-13-2015
    Location
    United States
    MS-Off Ver
    2003
    Posts
    62

    Re: VBA: Cell displays certain value and is black, but if I override that, it's red Excel

    Thanks for the replies. Could someone give me a bit of a walkthrough as to how to input these formulas into excel? I'm still a bit of a newbie with this stuff. Thanks!

  15. #15
    Forum Contributor
    Join Date
    01-03-2018
    Location
    Fukuoka, Japan
    MS-Off Ver
    Excel 2013
    Posts
    123

    Re: VBA: Cell displays certain value and is black, but if I override that, it's red Excel

    Do you know how to use Conditional Formatting?
    If no, there're a bunch of resources on the web, so just google it with the keywords "excel 2003 coditional formatting".

    UDF stands for User Defined Function, that is a custom function created by using VBA code.
    The UDF below returns TRUE if the target cell contains Formula.

    Please Login or Register  to view this content.
    First of all, to use this UDF, open VBA editor by hitting ALT+F11.
    Next, insert a Standard Module (ALT+I, M) and paste the code.
    Now you can use the UDF just like pre-defined worksheet functions.

+ 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. Override a cell that has a formula
    By Treecko in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-29-2013, 07:11 PM
  2. Need help to override cell values using macro
    By sasindiv in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-09-2013, 12:46 PM
  3. VLOOKUP override existing cell value
    By gammaman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-09-2013, 07:59 PM
  4. How can I override the value in a cell
    By MannyLNJ in forum Excel General
    Replies: 5
    Last Post: 09-02-2012, 08:48 PM
  5. Override Cell
    By WCE_123 in forum Excel General
    Replies: 1
    Last Post: 10-17-2011, 03:58 AM
  6. Override cell value with conditional format
    By craigproudfoot in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-28-2010, 08:56 AM
  7. Heres a pickle. Image Displays a Black streak
    By gjmcleod in forum Excel General
    Replies: 1
    Last Post: 07-23-2007, 08:06 PM
  8. [SOLVED] Cell Value Override
    By saschamps9903 in forum Excel General
    Replies: 0
    Last Post: 01-21-2005, 06: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