Solved

Use a value in a For Selection loop

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Compare 3,000cells with each one of 500,000 cells, how? 83 46
Math Incorrect 2 21
E2 + M2 = N2 == 10:02 AM 3 20
Subtraction 4 15
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

808 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