Solved

Use a value in a For Selection loop

Posted on 2014-07-22
2
56 Views
Last Modified: 2014-07-22
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

0
Comment
Question by:RWayneH
2 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40212501
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
 

Author Closing Comment

by:RWayneH
ID: 40212516
Yup that was it.  Thanks
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now