Solved

Use a value in a For Selection loop

Posted on 2014-07-22
2
65 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

679 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