+ Reply to Thread
Results 1 to 6 of 6

Excel XP: Treat specific text as zero.

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    Maryland
    MS-Off Ver
    Office 365
    Posts
    8

    Excel XP: Treat specific text as zero.

    Essentially what the title says.

    I have 2 specific words in my workbook that I need Excel to recognize as a 0, but display the entered text.

    Normally I would just use 0, but in this case, 0 can actually mean 2 different things (but still calculate as 0).

    The 2 words are "pick" and "off". I know I could change the formulas in other cells that reference these cells and use the IF function, but that would require a lot of time. The simpler method for me would be a VBA script.

    Any help would be appreciated.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Excel XP: Treat specific text as zero.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    10-15-2012
    Location
    Maryland
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Excel XP: Treat specific text as zero.

    Sorry, I thought I made myself clear on what needed to be done. My mistake.

    Here is an example.

    VBA function would be preferred.

    Thanks!
    Attached Files Attached Files

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Excel XP: Treat specific text as zero.

    No need for VBA because it can be easily achieved by correcting the formula.

    In H12 Cell

    =H9-IF(OR(H8={"Pick","Off"}),0,H8)


    In J12 Cell

    =J9-IF(OR(J8={"Pick","Off"}),0,J8)

  5. #5
    Registered User
    Join Date
    10-15-2012
    Location
    Maryland
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Excel XP: Treat specific text as zero.

    Ok, I guess I'll have to use this. I was trying to avoid changing the formulas because the workbook I was going to apply the VBA code to is more complicated than the simple formula in the example I used.

  6. #6
    Registered User
    Join Date
    09-10-2014
    Location
    Chino
    MS-Off Ver
    2001
    Posts
    1

    Re: Excel XP: Treat specific text as zero.

    Thanks for sharing this I also have the same problem.

+ 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. Treat an Operator Like Text
    By kimbekaw in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-28-2014, 04:53 PM
  2. How to treat specific text as numerical value
    By HavokJak in forum Excel General
    Replies: 2
    Last Post: 05-17-2014, 11:23 PM
  3. [SOLVED] Treat numbers as text
    By stealf in forum Excel General
    Replies: 2
    Last Post: 10-03-2012, 06:05 AM
  4. Treat Decimal Value in Text Box
    By Breizh29 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2010, 09:22 PM
  5. force Excel to treat numbers as text
    By GottaRun in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-18-2006, 06:15 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