View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kleev
 
Posts: n/a
Default formatting a cell with text from other cells

I'm not sure if I follow everything you are saying, but, if the cell above
the cell that you are putting this formula has, for instance PN1234, and you
want the cell with the formula to read P1234-01, and, if the digits will
always be 4 digits long, this formula should work. Note: as soon as you hit
the equal sign (=) you will be in formula mode. Reading your reply to
another post, it doesn't appear that you were in formula entry mode. Perhaps
you entered a space first? = needs to be the first character you type in
that cell. So type the following:
="P" & right(
Now use your up arrow key once to point to the cell above it, and that cell
will be entered in your formula. For instance, if you are in Cell A2 when
you start the formula, when you hit the up arrow key, your formula will now
look like this:
="P" & right(A1
now continue typing the following and it will be included in your formula:
, 4) & "-01"
So now your complete formula looks like this:
="P" & right(A1, 4) & "-01"
Hit Enter and it should do what you want. However, if it won't always be 4
digits, but will always start with PN, you could change the formula as
follows:
="P" & mid(A1, 3, len(A1) -2) & "-01"
Let me just paste these back to Excel and make sure I didn't make any
mistakes ...
Looks ok to me. HTH.

"clrwtrms" wrote:


okay I have a VERY SIMPLE spreadsheet that is used to create shipping
labels

I need to be able to have a cell formatted so that it reads like
this...

p (in this space have the value that is alpha numeric from a cell above
it) -01

and there can be no spaces as it's a barcode so basically if the Part
number is 1234 the barcode below it needs to read p1234-01 however have
the spot above it read PN: 1234, the way I have it setup right now is
that PN: is in one cell and the 1234 in another, Please help. I am
sure this has been asked umptien times but I am a new excelforum user
and didn't even know how to go about searching for this.

Thank you


--
clrwtrms
------------------------------------------------------------------------
clrwtrms's Profile: http://www.excelforum.com/member.php...o&userid=29703
View this thread: http://www.excelforum.com/showthread...hreadid=494154