View Single Post
  #1   Report Post  
leuce leuce is offline
Junior Member
 
Location: Netherlands
Posts: 3
Default How to add cell's reference to cell's content

G'day everyone

I'm trying to process some fairly complex Excel files in other editors (i.e. editors that simply extract the text from the Excel file) and it would be great if I could mark every cell with its reference. This would enable me to know which piece of text is in which cell, even if I'm not looking at it inside Excel.

So, is there a simple or quick way to add the cell reference of each cell to the start of that cell's content?

For example, if cell B5 has the content "The cat sat on the mat", then I would want cell B5's content to be updated to "[B5]The cat sat on the mat".

I understand that merged cells may pose difficulties but I don't care if merged cells' references are somewhat imprecise as long as I can figure out more or less where the cell is (e.g. as long as I know its row reference, or its column reference, or the reference of the top-left cell in the merged cell). Anyway the text that I'm concerned about generally don't occur in merged cells, so even if merged cells can't get references, it would still be okay.

I suppose this would have to be done using a macro -- I'm not afraid of adding macros to Excel although I'm not really a macro author (when I create macros in MS Word, for example, I do it mostly by recording).

Do you know of a program or tool or macro that would do what I specified above, i.e. to add each cell's cell reference to the start (or end) of the cell?

Thanks
Samuel (leuce)