+ Reply to Thread
Results 1 to 13 of 13

Need Help generating text for cells based on restults of my formula

  1. #1
    Registered User
    Join Date
    08-13-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    66

    Question Need Help generating text for cells based on restults of my formula

    So basically I have a spreadsheet that tracks if a patient has turned in there required paperwork within the last 6 months and then changes the cell to white and lets me know how many days they have left until they are due to turn this paperwork in again. Then if it has expired I have a condition format change the cell to Red but I would like to add in the text EXPIRED to the cell. lastly I have Cells that have no data in them gray and I would like to add in red text saying No Paperwork.

    I'm hoping this will be my last build of this spreadsheet so I can go ahead and start applying it to the real workbook
    Thank you again ahead of time for the help everyone.

    http://www.excelforum.com/excel-form...80#post3365280

    I guess I should reference this topic as its where I got the working formula in the first place.
    Attached Files Attached Files
    Last edited by 33CDonnelly; 08-15-2013 at 12:34 PM.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Need Help generating text for cells based on restults of my formula

    I don't believe you can combine icon with text when you are using conditional formatting. But I might be wrong.

  3. #3
    Registered User
    Join Date
    08-13-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: Need Help generating text for cells based on restults of my formula

    sorry I should have been more clear I only want to add the text to the red and gray boxes in column C, Column B is fine as is.

  4. #4
    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
    53,048

    Re: Need Help generating text for cells based on restults of my formula

    You cant add text with Conditiona Formatting, but what you may want to try is to just have the text in the cell, but make it the same color as the cell if the condition is not met - then change teh font color
    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

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Need Help generating text for cells based on restults of my formula

    + 1 what FDibbins said.

  6. #6
    Registered User
    Join Date
    08-13-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: Need Help generating text for cells based on restults of my formula

    well the problem is I can't directly add the text into the cell as it's currently calculating how many days are left til they are due to turn in the documents again. What I think I need is another If statement to validate the first equation such as value returned is <=0 Return EXPIRED, and if no data has been input into the formula to return NO PAPERWORK, I just have no idea how to do this. I know I can't add text through conditional formatting sadly it was the first thing I tried lol. Im still pretty new to excel only been working with it for 3 days.

  7. #7
    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
    53,048

    Re: Need Help generating text for cells based on restults of my formula

    well if you take the forumula you already have there, a;; you need to do (I think) is add something like...

    =IF(cell ref=condition-that-needs-to-be-met-to-show-text,"Your-Text",your-orginal-formula)

  8. #8
    Registered User
    Join Date
    08-13-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: Need Help generating text for cells based on restults of my formula

    =IF(COUNT(E17:AB17)=0,"",(INDEX(E17:AB17,1,MATCH(99^99,E17:AB17,1))+180)-TODAY())

    Is the current working formula, If I can even get it to just say expired when the value is = to a negative value that would be great

    =IF(COUNT(E17:AB17)>=-1,"EXPIRED",(INDEX(E17:AB17,1,MATCH(99^99,E17:AB17,1))+180)-TODAY())
    Works to display the word Expired but unfortunately when the value changes it doesn't display the value like it should. Did I miss up the code there or do I have to add something else?

    Also I have no idea how to use the cell ref formula I'm still a baby to excel lol :P
    Last edited by 33CDonnelly; 08-14-2013 at 07:25 PM.

  9. #9
    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
    53,048

    Re: Need Help generating text for cells based on restults of my formula

    maybe this?

    =IF(COUNT(E17:AB17)>0,"EXPIRED",IF(COUNT(E17:AB17)=0,"",(INDEX(E17:AB17,1,MATCH(99^99,E17:AB17,1))+180)-TODAY()))

    You changed your otiginal formula instead of adding another condition to it

  10. #10
    Registered User
    Join Date
    08-13-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: Need Help generating text for cells based on restults of my formula

    yeah decided to ignore the whole no paperwork thing and simplify it, that equation works correctly when an old date is entered making the value result in a negative value, but unfortunately it also displays when its a positive value rather then displaying the number like it should any way around that?

  11. #11
    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
    53,048

    Re: Need Help generating text for cells based on restults of my formula

    umm duh, a count can never be less than 0 lol (my bad for not picking that up before)

    what else would we use to ID when that text comes up?

    edit: what about putting...
    =IF(COUNT(E17:AB17)=0,"EXPIRED",(INDEX(E17:AB17,1,MATCH(99^99,E17:AB17,1))+180)-TODAY())

  12. #12
    Registered User
    Join Date
    08-13-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: Need Help generating text for cells based on restults of my formula

    Doesn't work, that displays EXPIRED when there is no data input rather then when the value is a negative indicating that paperwork is past due.

    I believe maybe we need to nest an if statement to validate the sum of the formula to return the correct result?

    http://www.excelforum.com/excel-form...ment-help.html

    Checking with the code section people since I feel this belongs there now.
    Last edited by 33CDonnelly; 08-15-2013 at 12:33 PM.

  13. #13
    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
    53,048

    Re: Need Help generating text for cells based on restults of my formula

    Well please dont post another thread on this in the VBA section, it will get closed for duplicate thread

    I was just thinking. you cannot have a negative date, nor a negative count, so maybe we need to build a MIN() in there somehow and compare that with the date you want to test for?

    Can you give me an example of a row that you would want to show EXPIRED in?

+ 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. auto generating number based on information from other cells
    By cody1187 in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 02-21-2012, 02:27 PM
  2. Generating text file out put from worksheet on click of button based on parameters
    By sethumurugan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-30-2011, 04:40 AM
  3. VBA code for inserting formula, based on another cells text value.
    By Pancho3 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-05-2011, 04:30 PM
  4. Generating urls in spreadsheet based on matching cells.
    By giallofever in forum Excel General
    Replies: 4
    Last Post: 03-05-2009, 12:47 PM
  5. generating text box value based on equation from other boxes
    By Craig in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2006, 11:34 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