I want to enter the text in a cell, but its depend upon another cell value formatting. example:

In A1 value is "Vaibhav" and if I will make it in bold(Ctrl+B), then automatically the next consecutive cell value will come as "Present", else will come as "Absent".

vaibhav present
reena absent
rahul present
vijay present
nikita absent

  • 2
    Did you try something? – Toto Apr 16 at 7:29
  • yes, but nothing is working. – Vaibhav Johari Apr 16 at 8:01
  • Can I suggest simple VBA method to you? – Rajesh S Apr 16 at 8:38
  • 3
    What you describe is not "conditional formatting", when you change content of a cell (present / absent) is not formatting! As @RajeshS has mentioned already, it require VBA to implement your desired functionality. However I'd not suggest that. Formatting in Excel is not for storing any information, it's very easy to accidentally loose formatting and so information too. I'd suggest the other way round: enter present/absent in the second column (maybe using data validation drop-down) and apply conditional formatting (bold font) on your first column. – Máté Juhász Apr 16 at 8:51
  • What is the overall goal you want to accomplish? Are you just looking for a simple way to document attendance? Or does it have to be completed specifically as you suggest? – CharlieRB Apr 17 at 15:21
up vote 1 down vote accepted

As others have noted, this isn't technically conditional formatting.

To do this you need to do use VBA - so open up the VBA editor (Alt+F11), create a new module (menu option "Insert", then "Module") and put this code into that module:

Public Function IsBold(ref As Range)
    If ref.Font.FontStyle = "Bold" Then
        IsBold = True
        IsBold = False
    End If
End Function

Close the editor and, assuming that your first name ("vaibhav") is in cell A1, put the following into B1:

=IF(isbold(A1), "present", "absent")

Given that FontStyle returns Bold, I suspect that this might not work for non-English versions of Excel - however I'm unable to test this.

  • Dear Richard, thank you for your answer, it was really a great help for me. – Vaibhav Johari Apr 19 at 5:20

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.