1

I am a newbie to function writing in Excel and really need help urgently.I need to assign serial numbers with uneven increments. For Example I have a column B that contains some names of customers in bold and some are unbold. I want write a function that checks for bold text in Column B and assign a serial number (e.g 1, 2,..) to it in adjacent column A. The out below is what I desire:

Column A        Column B

1               **Peter**

                Micheal

                George


2               **Julia**

3               **Sam**
4b0
  • 21,981
  • 30
  • 95
  • 142
MissExcel
  • 11
  • 2
  • As far as I know it's not possible to check if the text is bold using formulas. You will have to put some kind of flag on the lines where you want a serial number. For example, if we put "1" in column C next to Peter, Julia and Sam, the formula in A2 would be `=IF(C2=1;MAX(A$1:A1;1))` (then you copy it down on the other lines). – Cutter Feb 17 '12 at 08:33
  • Thank You! the MAX function helped! – MissExcel Feb 20 '12 at 08:40

1 Answers1

1

You can do this with a Named Range - XLM workaround

  1. Define a new range name,IsRightCellBold as =GET.CELL(20,INDIRECT("RC2",FALSE)). This will return True if the cell to the immediate right is either all Bold or has the first character as Bold
  2. Enter this formula in A2 =IF(IsRightCellBold,MAX($A$1:A1)+1,"") and copy down

enter image description here

brettdj
  • 54,857
  • 16
  • 114
  • 177