+ Reply to Thread
Results 1 to 7 of 7

Is it possible to treat text as a number in excel?

  1. #1
    Registered User
    Join Date
    06-10-2016
    Location
    Qatar
    MS-Off Ver
    2016
    Posts
    18

    Thumbs up Is it possible to treat text as a number in excel?

    Dear All,

    Is it possible to treat text as a number in excel?
    For example while using =if formula can I use Days,Months or other text as number.
    Last edited by kskhan; 06-11-2016 at 09:13 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,620

    Re: Is it possible to treat text as a number in excel?

    Provide a better explanation and example. How can the word "Days" be used as a number??
    Ben Van Johnson

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Is it possible to treat text as a number in excel?

    Agree that you will find more help if you provide some samples of what you are dealing with.

    And depending on how your cell is formatted, Days,Months may in fact already be numbers, if they are real dates
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    06-10-2016
    Location
    Qatar
    MS-Off Ver
    2016
    Posts
    18

    Red face Re: Is it possible to treat text as a number in excel?

    Thanks for the reply.
    Actually I'm preparing a file of daily task against the day using =TOday()formula, Then I have 6 cells with the tasks. Now what I want is to have that specific task on the day using =if(A1=Sunday,Task,"") but getting error on this.
    Please find the attached screenshot of the texts & formula I'm trying to use.
    I hope that you'll be able to help me now
    Attached Images Attached Images
    Regards,
    Kashif

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Is it possible to treat text as a number in excel?

    =TODAY returns the date as a number, so you need to get the weekday from it.

    =IF(WEEKDAY(A1)=7,"",

    Sunday =1, Saturday =7.

    If Saturday was actually text then you would have needed to enclose the test string in double inverted commas, =IF(A1="Saturday",""
    Last edited by jason.b75; 06-11-2016 at 04:59 AM.

  6. #6
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Is it possible to treat text as a number in excel?

    Hi

    Try something this assuming your datevalue in A1

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click just below left if it helps, Boo?ath?

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Is it possible to treat text as a number in excel?

    Quote Originally Posted by boopathiraja View Post
    Hi

    Try something this assuming your datevalue in A1

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    CHOOSE would offer more flexibility than LOOKUP

    =CHOOSE(WEEKDAY(A1),"","Task-a",Sheet1!B1,etc...

+ 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. Replies: 5
    Last Post: 09-22-2015, 01:55 PM
  2. Excel XP: Treat specific text as zero.
    By bigjayb024 in forum Excel General
    Replies: 5
    Last Post: 09-10-2014, 05:31 AM
  3. [SOLVED] How do I treat a negative number as a positive in a formula?
    By Thistledown in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-05-2013, 08:13 AM
  4. [SOLVED] Excel doesn't treat the number as a number
    By someko in forum Excel General
    Replies: 9
    Last Post: 02-18-2013, 08:28 AM
  5. Getting a formula to treat a fraction as a whole number
    By Monkbar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-22-2006, 12:50 PM
  6. 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
  7. How to make excel to treat values in cell as a number?
    By Peri in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2005, 06:45 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