How to space two texts in centimeters in the same Excel cell?

As shown in the figure below. I need to tab in a single cell two texts so that from one cell to the other (from the same column) the texts on the right are perfectly aligned (see column D).

insert the description of the image here

At the top of the figure: example of the result I have with the misalignment of the page numbers (column D).

At the bottom: the same stretch, but with the formulas applied.

In cell D2 the number of spaces in the distance in characters that the second text should be aligned is reported. Here the ideal is that they were "centimeters" or something and not spaces.

I know that there are numerous simple ways to do this, such as using two columns or a font with characters of the same size in pixels, but in my case I need to solve like this, in a single cell and with any font you want to apply.

This procedure should be added to a spreadsheet complex that dynamically manipulates a report that has links to various other spreadsheets and features. Text processing is dynamic, that is, if I mark a topic or uncheck it, the entire report is automatically adjusted, the numbers of the topics are modified, and the pages on which they are presented can be changed as well. For example, a topic " 4. Costs "which is on Page 34, depending on what is done, can turn the topic" 6. Costs " and appear on Page 59, and are numerous items, with topics and subtopics. The size of the cells and their columns should preferably not be modified.

Tried some ways to get the result, searched, but to no avail.

If you have a way, even if it is complex, it should be better and faster than studying and restructuring this worksheet.

Thank you for your contributions or comments.

Author: Leo, 2017-03-18

1 answers

The solution I present is not exactly as I would like, but it solved the problem simply and directly.

I added a TextBox (ActiveX control) at the end and over each line of the home page that can have text referencing the page (with the same spacing in number of lines in my case between the controls).

In the properties I switched to Transparent, aligned all and changed the font to the same active in Excel (as I believe there is no way to do this automatically recognize the source of the linked cell ), after that I grouped everything so that I could easily adjust the block to the sides for when appropriate.

In the property LinkedCell I pointed to the cell with the text of the page number to be displayed.

With this, the rows that have page number have sues TextBox updated dynamically, just as the others are "empty" and do not appear when they do not have page number. page.

See the example below:

insert the description of the image here

In the first line I highlighted the TextBox that each line has at the end, as well as in the last two lines, to show that they are all there, the other lines appear as they should appear for printing (the controls are also there). Because they are transparent and have no text, in fact the two final lines appear "blank" as they should appear, here I highlighted to better exemplify.

Is that!

 0
Author: Leo, 2017-03-20 13:56:55