Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CCB AA
 
Posts: n/a
Default Writing macro in Excel

I have a column of numbers, 4 numbers to a cell. I want to add an X at the
end of numbers in various cells. I double click on the cell, the curser
moves to the end of the number and I add an X. I move to the nexrt cell down
and repeat. When I do this with a macro, instead of adding just the X, it
writes in the number from the first cell and the X. How do I do make the
macro only add a X to the current number?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Writing macro in Excel


For Each cell in selection
cell.value = cell.Value & "X"
Next cell

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"CCB AA" wrote in message
...
I have a column of numbers, 4 numbers to a cell. I want to add an X at

the
end of numbers in various cells. I double click on the cell, the curser
moves to the end of the number and I add an X. I move to the nexrt cell

down
and repeat. When I do this with a macro, instead of adding just the X, it
writes in the number from the first cell and the X. How do I do make the
macro only add a X to the current number?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tjtjjtjt
 
Posts: n/a
Default Writing macro in Excel

I don't think you can do that with the recorder. Unless you have a way to
identify all of the numbers ahead of time, you can use the macro below. Just
click on the cell you want to add an X to and run the macro.
You will have to copy and past the code into your module.

Sub EndWithX()
ActiveCell.Value = ActiveCell.Value & "X"
End Sub

--
tj


"CCB AA" wrote:

I have a column of numbers, 4 numbers to a cell. I want to add an X at the
end of numbers in various cells. I double click on the cell, the curser
moves to the end of the number and I add an X. I move to the nexrt cell down
and repeat. When I do this with a macro, instead of adding just the X, it
writes in the number from the first cell and the X. How do I do make the
macro only add a X to the current number?

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
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Relative Ranges in excel macro edself Excel Worksheet Functions 6 October 13th 05 02:02 PM
passing arguments from an excel macro to a word macro KWE39 Excel Discussion (Misc queries) 1 July 7th 05 03:56 PM
Excel macro that opens new MS Word file and pastes data as a pictu Rob Excel Worksheet Functions 0 July 6th 05 05:12 PM
Macro in Excel 2002 to save a workbook to a FTP location Lloyd Excel Discussion (Misc queries) 0 December 21st 04 02:49 PM


All times are GMT +1. The time now is 12:02 PM.

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

About Us

"It's about Microsoft Excel"