PC Review


Reply
Thread Tools Rate Thread

ActiveCell.FormulaR1C1 question

 
 
=?Utf-8?B?T21hcg==?=
Guest
Posts: n/a
 
      23rd Oct 2006
The next code pretends to copy the values from a column, paste them in
another column and assign the correct format for each single cell. For this
last part I mean to:
1) press F2
2) press Enter

This combination of keys changes the cell's format, have you tried it? (Not
at the same time) Well, that's what I use to change cell's values format.
Anyway, when I was recording the macro, the VBA "builder" interpreted it as:
ActiveCell.FormulaR1C1 = 'Here goes the cell's value

It works for same cases, but not for all. I have some questions about it:
I. Did you understand me?
II. How can I change automatically "09/01/01" to "9 de Enero de 2001" (In my
country, the date order is represented as: DD/MM/YY)

Sub Macro4()
Dim celda, renglon, valor
renglon = 2
Range("AC2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("AD2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Do While renglon < 2311
celda = "AD" & renglon
Range(celda).Select
valor = Range(celda).Value
Range(celda).Activate
ActiveCell.FormulaR1C1 = valor
renglon = renglon + 1
Loop
Application.CutCopyMode = False
celda = "AD2"
Range(celda).Select
Range(celda).Activate
End Sub

Thanks in advance.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveCell.FormulaR1C1 Rick Microsoft Excel Misc 3 28th Mar 2010 10:36 PM
ActiveCell.FormulaR1C1 Slohcin Microsoft Excel Programming 3 8th Sep 2009 05:12 PM
ActiveCell.FormulaR1C1 SteveDB1 Microsoft Excel Programming 4 28th Mar 2008 02:55 PM
activecell.formular1c1 monika Microsoft Excel Programming 0 29th Apr 2004 10:13 AM
ActiveCell.FormulaR1C1 Leif Rasmussen Microsoft Excel Programming 1 16th Oct 2003 09:46 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:55 PM.