Use a value in a For Selection loop

How do I name a cell, (want H6 to be MatlNumber), so the value can be used in a different part of a spreadsheet?
This is the tail end of a For Selection loop, and after I select H6, I want to go back to the selection "C" and place the value that was there, two columns to the right of the selection it is working on.

        
       Range("H6").Select
       MatlNumber = H6
       Sheets("Summary").Select
       C.Offset(0, 2).Value = MatlNumber

Open in new window

RWayneHAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Glenn RayConnect With a Mentor Excel VBA DeveloperCommented:
Try this modification to your code:
       MatlNumber = Range("H6").Value
       Sheets("Summary").Select
       C.Offset(0, 2).Value = MatlNumber

Open in new window


Regards,
-Glenn
0
 
RWayneHAuthor Commented:
Yup that was it.  Thanks
0
All Courses

From novice to tech pro — start learning today.