Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to Active Cells Excel

Status
Not open for further replies.

amecari

Technical User
Mar 21, 2001
29
BR
Hi,
I have a column "D" with numbers that I've captured from another program. I need to sum this numbers but for this is necessary active the range.
I try this way using a VBA:

Worksheets("Plan1").activate
For Z = 5 To 88
Range("d5:d88").Select
Range("D" & Z).Activate
but isn't work.
Help me please.
Thanks
 
I'm sorry but your posting doesn't make sense to me.

Can you explain what you are trying to do?

Why do you think it is necessary to activate cells to be able to sum them?

Guess: if the cells contain numbers, but are actually text, and summing is not working, then type a 1 into an empty cell, do Edit/Copy of that cell, then select range D5:D88 and do Edit/PasteSpecial/Multiply which will convert text numbers into numeric entries.

Glenn.
 
ok.
Is something like this: I'm using a macro to capture screens from another program and to load into excel . The numbers in the screens is 1.230,45 in the cell is 1230,45. I'd try to format but only works if I active the cell before. Like to click twice or F2. I have a range d5:d88 in 36 worksheets. How I can active the range into worksheets????
 
As I said in my previous post ...

"type a 1 into an empty cell, do Edit/Copy of that cell, then select range D5:D88 and do Edit/PasteSpecial/Multiply which will convert text numbers into numeric entries."

Glenn.
 
I think I understand what you are trying to do. The first thing is that you can name the range prior to loading the data into the range and call it something like "loadeddata". You can then reference "loadeddata" in the code and it would reference d5:d88.

The other option is to do a find/replace manually. If you do not want to do it manually, then you could set up a command such as REPLACE to find and replace the "." after the "1" in your example above with nothing.

Does this help?
 
Thanks a lot GlennUK and Hasit it works very well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top