+ Reply to Thread
Results 1 to 3 of 3

Format the value of a cell using if statement

  1. #1
    Registered User
    Join Date
    04-19-2019
    Location
    US
    MS-Off Ver
    MS 2010
    Posts
    1

    Format the value of a cell using if statement

    Hello,

    I want to format the value of a cell. For example:

    I have a value of 1.25 in cell A1 and a value of 0.02 in cell A2. Now I want to add three asterisks (***) right behind 1.25 (that is 1.25***) and output 1.25*** in cell A3 if the value in A2 is less than 0.01. Similarly, if the value in A2 is between 0.01 and 0.05, add two asterisks; if the value in A2 is between 0.05 and 0.1, add one asterisk; if the value in A2 is greater than 0.1, no asterisk is added. So the output I want based on my example is 1.25**

    Is it possible to write an if formula to achieve what I need? Such formula =if(A2<0.01,A1"***") does not work.

    Another thought I have is to output asterisks only and combine cell value and asterisks. For example, I can have 1.25 in cell A1 and *** in cell A2. Can I use a formula to output 1.25*** in another cell by combining the content in cells A1 and A2?

    Thank you.

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Format the value of a cell using if statement

    Maybe this?

    =if(A2<0.01,A1&"***")
    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 Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Format the value of a cell using if statement

    May be:
    Please Login or Register  to view this content.
    Quang PT

+ 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. If statement to format cell
    By morris56 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-10-2016, 09:02 AM
  2. [SOLVED] Put an if statement according to cell format
    By Gary's Student in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-06-2005, 05:05 PM
  3. Put an if statement according to cell format
    By Melkett in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  4. Put an if statement according to cell format
    By Melkett in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  5. [SOLVED] Put an if statement according to cell format
    By Gary's Student in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 09:05 AM
  6. [SOLVED] Put an if statement according to cell format
    By Melkett in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. Put an if statement according to cell format
    By Melkett in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-31-2005, 02:05 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