Formatting two cells i think

  • Thread starter Thread starter sh0t2bts
  • Start date Start date
S

sh0t2bts

Hi All

I want to show a cell with two values in it and use these values to perform
other calculations, I think it is just formatting but not too sure. here
what I want:-
A B
1 | Title |
2 | 33 / 54 |

What I am trying to achieve is to have the border between the two cells to
be formatted slanted, I would the merge cells A1 & B1 to give the appearance
of the data in Cells A2 & B2 to be in the same cell but with a slash
separating them


Is this possible??


Cheers

Mark
 
Hi Mark
though this could be done:
merging the cells using a macro which combines both values separated by
a slant I wouldn't do this:
- merged cells should IMHO not be used as they create lots of problems
(sorting, filtering, etc.)
- You can't use Excel's build-in formulas to calculate with the
resulting value. You either have to parse the values with
worksheetfunctions or create your own user defined functions in VBA
 
I want to show a cell with two values in it and use these values to perform
other calculations, I think it is just formatting but not too sure. here
what I want:-
A B
1 | Title |
2 | 33 / 54 |

What I am trying to achieve is to have the border between the two cells to
be formatted slanted, I would the merge cells A1 & B1 to give the appearance
of the data in Cells A2 & B2 to be in the same cell but with a slash
separating them

Is this possible??

Not directly. I believe you'd be best off putting the two values in other cells
or defining names that refer to expressions that produce these two values, then
putting a formula like

=FirstValue&" / "&SecondValue

in A2, select A2:B2 and format as centered across selection. Refer to FirstValue
and SecondValue rather than A2 and B2 in other calculations. Alternatively, put
your values into A2 and B2, give them both the number format ;;;, and set the
border between them with border color the same as the cell background color.
Then enter the formula

=A2&" / "&B2

in some other cell, copy it, select A2, hold down a [Shift] key and run the menu
command Edit > Paste Picture Link. At the cost of a formula in another cell and
some formatting overhead, you'll have the values you want in A2 and B2 appearing
the way you want them to. It's fragile, but it may meet your needs.
 
Try using a custom format. Format, Cell, Custom. Create
a custom format for the left cell as follows: 0," / ".
The number can be used in calculations, but the display
will be with the slash.

The custom format is: zero, comma, open quote, space(s),
forward slash, space(s), and closing quote.

You can then copy the format to other cells.

Good luck.
 
Back
Top