Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to add text in Cell (in a range of Row)


Hello,
in sheet1, I would like to add text in cells in Column C from a rang
of row (by FirstRow to LastRow.

In Cell C11 to C?? (LastRow) i would like to add "U-".
does anyone could help me to perform this ?
Thanks in advance.
Herv

--
herv
-----------------------------------------------------------------------
herve's Profile: http://www.excelforum.com/member.php...fo&userid=2731
View this thread: http://www.excelforum.com/showthread.php?threadid=47404

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Macro to add text in Cell (in a range of Row)

Hi Herve,

I assume that your intention is to add "U-" as a prefix to existing text.

Try:
'============
Public Sub Tester()
Dim LCell As Range
Dim rng As Range
Dim rCell As Range

Set LCell = Cells(Rows.Count, "C").End(xlUp)
Set rng = Range("C11", LCell)

For Each rCell In rng.Cells
rCell.Value = "U-" & rCell.Value
Next rCell
End Sub
'<<============

---
Regards,
Norman



"herve" wrote in
message ...

Hello,
in sheet1, I would like to add text in cells in Column C from a range
of row (by FirstRow to LastRow.

In Cell C11 to C?? (LastRow) i would like to add "U-".
does anyone could help me to perform this ?
Thanks in advance.
Herve


--
herve
------------------------------------------------------------------------
herve's Profile:
http://www.excelforum.com/member.php...o&userid=27314
View this thread: http://www.excelforum.com/showthread...hreadid=474046



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to add text in Cell (in a range of Row)


Cheers Norman


--
herve
------------------------------------------------------------------------
herve's Profile: http://www.excelforum.com/member.php...o&userid=27314
View this thread: http://www.excelforum.com/showthread...hreadid=474046

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
displaying text in a cell if a another cell falls in a range THIRDCOAST Excel Worksheet Functions 2 February 1st 08 06:24 PM
Macro - Inserting text to a cell already containg text Dileep Chandran Excel Discussion (Misc queries) 6 December 7th 06 03:42 PM
Need macro to delete all text cells in an Excel range GVT Excel Worksheet Functions 2 February 26th 06 12:25 PM
Macro to Create text file from range of cells? Joan Roco[_2_] Excel Programming 1 July 28th 04 07:28 PM
force text in a cell based on value of cell in a range jjst34 Excel Programming 7 December 2nd 03 10:23 PM


All times are GMT +1. The time now is 03:48 PM.

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"