Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copying a macro to several cells

Hi All,
I want to copy a macro to several cells with the results showing next to the
columns
e.g.
marks grades
85 A
75 B
65 C
50 D
instead of me running the macro every time for each student.






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default copying a macro to several cells

I concure with Norman that you don't need a macro for this... That having
been said here is the code you want

dim rngCurrent as range

set rngCurrent = sheet1.range("A2")

do while rngcurrent.value < Empty
rngcurrent.select 'This assumes that your macro works using selection
'Call your macro here...
loop

set rngCurrent = nothing

That having been said you should really look at the vlookup function...

HTH

"rkibui" wrote:

Hi All,
I want to copy a macro to several cells with the results showing next to the
columns
e.g.
marks grades
85 A
75 B
65 C
50 D
instead of me running the macro every time for each student.






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
Copying filtered four cells by means of macro CousinExcel Excel Discussion (Misc queries) 4 January 15th 10 03:33 PM
Copying cells with a macro MAWII Excel Discussion (Misc queries) 1 April 18th 05 06:50 PM
copying a macro to several cells Kibui Excel Programming 2 January 14th 05 08:49 PM
Trouble with a macro - copying cells ToddG[_3_] Excel Programming 6 May 20th 04 05:52 PM
stuck on final prat of spreadsheet "macro copying cells" alan_bourne[_18_] Excel Programming 4 November 17th 03 09:32 PM


All times are GMT +1. The time now is 11:59 AM.

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"