Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I managed to pull it off with this (shortly after posting this message the
lightbulb went off): Dim mycell As Range For Each mycell In Range("A:A").Cells If mycell.Value < "" Then mycell.Value = "\\" & mycell.Value & "\c$" End If Next How can I go through the cells and if there's already a "\\" at the beginning of the cell entry, it won't add the "\\"? Thanks! "Chip Pearson" wrote: Try something like Dim Rng As Range For Each Rng In ActiveSheet.UsedRange.Columns(1). _ SpecialCells(xlCellTypeConstants).Cells Rng.Value = "\\" & Rng.Text Next Rng -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "MAWII" wrote in message ... I have a spreadsheet with 732 entries in column A. I want to create a macro that will add a "\\" to the beginning of each entry. I also want it done only for non-blank cells. How can I do this? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding text in cells | New Users to Excel | |||
Adding Cells that Contain Text | Excel Worksheet Functions | |||
Adding Cells that Contain Text | Excel Discussion (Misc queries) | |||
Adding a lot of text to MS Excel cells | Excel Discussion (Misc queries) | |||
Adding two text cells together | Excel Discussion (Misc queries) |