Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I always use "Equation Object" in Microsoft Word, and I know that one can also insert such an object in Excel. However, the inserted Equation Object just "floats" on excel, it's not "inside" any cell.

Is there a way to put the Equation Object inside an Excel cell? so that sorting etc won't lose the information.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Excel has a layer for objects. You cannot put any object, be it image, shape, chart, etc. inside a cell. The best you can do is to format the object to move and size as you intend when the underlying cells are manipulated. You can do that by formatting the object and selecting the "Properties" tab or link (depending on your Excel version).

If you insert an object (in the screenshot it's a shape), the default settings are to "Move and resize with cells

enter image description here

In general, this means that the object's dimensions will be stretched out of proportion when the underlying row height or column width is changed.

enter image description here

In many cases, the setting to "Move but don't size with cell" will be the best choice, but it must be set before any row or column changes are applied. Then, changing row height or column width will not affect the object size at all.

enter image description here

In the latter example, the upper left corner of the object will always be positioned at exactly that cell. If rows or columns are resized/inserted/deleted, the object will retain its size.

With regards to the Equation object, it looks as if the defaults for this are already set to "Move but don't size with cells". So, the only thing you need to do is to position the object where you want it to appear.

enter image description here

Tip: If you hold down the Alt key while dragging an object, it will snap to the grid of the Excel spreadsheet, so you can easily align an object's top left corner to the top left corner of a particular cell.

If your concern is with maintaining an object with its associated cells, then make sure that the cell is anchored (Alt - drag) to the desired row and use "Move but don't size with cells".

In the following screenshot, three Equation objects have been positioned in column B. Column A has some text values. The Equation objects have been Alt-dragged to align perfectly with the cells. The column widths and row heights of have been adjusted so it looks as if the Equation object are INSIDE the cell (which they are not).

enter image description here

Using the Sort functionality of Excel, the table is then sorted by the values in column A. Here is the result:

enter image description here

Each equation object stays with its allocated order marker in column A, because the objects move with their underlying cells, but they are not resized when the cell dimensions change.

share|improve this answer
    
+1 excellent walkthrough and great tip on using alt+drag to snap to cells - never knew about this! Thanks! –  Andi Mohr Feb 5 at 10:02

I'm not sure if I'm reading between the lines correctly, as I'm uncertain what you mean by "losing the information" -- if you want an equation object to remain associated with other data upon which you are sorting, then this isn't what you are looking for, and @teylyn has probably answered your question

However, if you literally want something calculated, type for example =A1 * (A3 + B3) in cell C3.

If you then sort, say using values in column D, and if for example what was row 3 winds up in row 11, then your equation in C11 will become =A9 * (A11 + B11). If you want the reference that is now A9 to stay fixed on A1 (i.e. A1 * (A11 + B11), use =A$1 * (A3 + B3) in cell C3.

Now that I've written that, I think my interpretation of your question probably was off the mark, but I'll most anyway just in case.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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