LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Macro to format selected cells

try
range(cells(activecell.row,"q"),cells(activecell.r ow,"bp")).format as
desired

--
Don Guillett
SalesAid Software

"BeSmart" wrote in message
...
Thanks Guys
I don't want the macro to work on specified row numbers or a range.
It needs to apply to the current row the user is working on (eg the

current cell) and apply to the cells between Q:BP for that row.
you advice is appreciated.
BeSmart

----- Don Guillett wrote: -----

You could use
range("q20:bp22,q25:q35").format
or
selection.format


--
Don Guillett
SalesAid Software

"BeSmart" wrote in message
...
Hi all
I'm not very good at writing Macros (I cheat alot and manually

record
them, then make minor changes when needed)...
Here I don't know the codes to enter to replace specific

selections...
I need to change "Range("Q20:BP20").Select" to specify cells

in
columns Q:BP for the current selected row
I also need to change the last action to re-select original

active.cell.
If I wanted to copy that macro and change the range selection to

be
whatever the user has just selected (ie current.selection), how do I

write
that?
Sub Macro1()

'
' Macro1 Macro
' Macro recorded 6/05/2004 by BeSmart
'
Range("Q20:BP20").Select
Selection.NumberFormat = "0"
Range("Q20").Select
End Sub
Also, where is the best website to go and learn (basic dummy

version)
about writing, reading and understanding Macro/VBA code, ie the

language and
actions etc.. (eg I found cpearson.com really helpful for excel

formula
information - especially the excel-help download, is there anything

like
that to explain Macros and the definition of codes?)
(I don't have VBA help installed on my laptop and the install

disc's are 4
hours drive away in the head office....)
Sorry for the basic question. Any help greatly appreciated.








 
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
Format drop down option won't open on selected cells Ron West Excel Discussion (Misc queries) 1 October 12th 06 09:36 PM
Macro to Saved Selected Excel data to .CSV format joelbeveridge Excel Discussion (Misc queries) 18 August 8th 06 12:59 PM
How to save selected cells as jpeg or pdf or webpage format? DORI Excel Worksheet Functions 2 November 29th 05 11:44 PM
How to save selected cells as jpeg or pdf or webpage format? DORI Excel Discussion (Misc queries) 0 November 29th 05 06:00 AM
Format cells if hovered over or selected Adam R Excel Discussion (Misc queries) 2 April 25th 05 05:04 PM


All times are GMT +1. The time now is 04:25 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"