View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
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.