You are here:

Excel/Cell format issue.


Excel Question
Excel Question  
My issue revolves arround changing the content of many cells at once.

I have copied an "HTML grid" into excel (2007.
The worksheet is fine and the cells have the content that they should.

Each cell contains either a single letter or a time eg:
The letter can be any one of 6 different options.. "L" "R"...
The time is in the format 08:30-17:00 (again about a dozen different possibilities.
All these values are hyperlinks and get imposrted as such.

What I would like to do is twofold.

1. Convert the hyperlinks to Text (I have tried formatting the box using the cell/format/text option but it didn't work. I am having to delete the hyperlink and retype the letter.

2. Covert the cell that contains a "time" (doesn't matter what value) to the word "IN"

The other ooption I have is to "count" the cells that contain the hyperlink values. But I need to differentiate between a cell containg "time" and one containing a "letter"

Thank you
Steve Gill

Steve Gill,

I found your question in the question pool.

If you still need an answer.

You might want to do this on a copy of your sheet.

to get rid of they hyperlinks, you can go to the vba editor and execute a single command.

1. Activate the sheet with the hyperlinks
2. Do Alt+F11 to get to the visual basic editor
3. do ctrl+G to make the immediate window visible.  It should be in the lower part of the visual basic editor
4.  put in this command in the immediate window
anywhere in that string and hit enter
5.  Do alt+F11 to return to execl and the hyperlinks should be gone and the displayed value of the hyperlink remaining in the cells

If all your cells are of the time you show (with a hypen), then you can do this to count those cells


You can replace A:L with a specific range of cells you want to address or do entire columns such as I show.  The formula should not be in the range you are counting.

You can use =countA(A:L) to get a count of all cells with an entry.  

Your picture was too small to read, so I am assuming the countif and count will work for you.

Tom Ogilvy  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 All rights reserved.