Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Formatting Cells?

Hello,
I need to know how to put an * before and after each value I have in a
column. For example, if Column A is 1 to 5, I will paste them in B, and then
change them to barcode font. My scanner only reads barcodes that start and
end in an * . It is easy to do it for a few by hand, but when there are
thousands, there has to be an easy way to do it. Thanks in advance.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default Formatting Cells?

In B1:

="*" & A1 & "*"

Copy this down as needed.

HTH,
Paul

"Ben" wrote in message
...
Hello,
I need to know how to put an * before and after each value I have in a
column. For example, if Column A is 1 to 5, I will paste them in B, and
then
change them to barcode font. My scanner only reads barcodes that start
and
end in an * . It is easy to do it for a few by hand, but when there are
thousands, there has to be an easy way to do it. Thanks in advance.




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Formatting Cells?

Ben

With "thousands" a macro may serve you well to change them in place.

Sub Add_Text()
Dim cell As Range
Dim thisrng As Range
On Error GoTo endit
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
For Each cell In thisrng
cell.Value = "*" & cell.Value & "*"
Next
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub


Gord Dibben MS Excel MVP

On Thu, 7 Jun 2007 09:09:01 -0700, Ben wrote:

Hello,
I need to know how to put an * before and after each value I have in a
column. For example, if Column A is 1 to 5, I will paste them in B, and then
change them to barcode font. My scanner only reads barcodes that start and
end in an * . It is easy to do it for a few by hand, but when there are
thousands, there has to be an easy way to do it. Thanks in advance.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting cells pblake Excel Discussion (Misc queries) 0 March 8th 07 07:48 PM
Formatting Cells Gerry Cornell Excel Discussion (Misc queries) 6 January 5th 07 12:41 AM
Formatting Cells PVE Excel Discussion (Misc queries) 1 April 6th 06 06:09 PM
Conditional Formatting Multiple cells based on 2 cells Louis Markowski Excel Worksheet Functions 2 June 1st 05 05:26 PM
Need help formatting cells Vinish Excel Discussion (Misc queries) 6 May 21st 05 02:17 AM


All times are GMT +1. The time now is 11:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"