Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default grab values from a range

I need to put together some VBA that will do this.

1) Copy the cell values of a named range from another workbook to this
workbook, starting in current cell.

2) I will then duplicate that code to create a second macro, but in the
second macro I'm going to replace the value in column m with a formula. I
think I can figure that part out if I can get the first chunk. Any help
appreciated.

thx - Russ
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default grab values from a range

Sub Macro1()
Workbooks("OtherWb").Sheets("Sheet1").Range("MyRan ge").Copy _
ActiveCell
End Sub

Hth,
Merjet


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default grab values from a range

Thanks Merjet!

"merjet" wrote:

Sub Macro1()
Workbooks("OtherWb").Sheets("Sheet1").Range("MyRan ge").Copy _
ActiveCell
End Sub

Hth,
Merjet



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default grab values from a range

Merjet,

Must the workbook be open? I'm using

Sub GetPlaybookData()
Workbooks("H:\IT Process Engineering Artifacts\Practice Area\CF
Playbook.xls").Sheets("Project Staffing").Range("Desired_Staffing2").Copy
ActiveCell
End Sub

and I keep getting subscript out of range. I googled that and it looks like
that would likely mean that something isn't there that I think is there.
This file, worksheet and range definitely exist. Any ideas? -thx
"merjet" wrote:

Sub Macro1()
Workbooks("OtherWb").Sheets("Sheet1").Range("MyRan ge").Copy _
ActiveCell
End Sub

Hth,
Merjet



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default grab values from a range

Yes, the workbook must be open for the code I gave you to work. If you
want to do it with a closed workbook, search this group for "closed
workbook".

Merjet


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMPRODUCT or SUMIF if any values in a range equal any values in another range PCLIVE Excel Worksheet Functions 3 July 15th 09 07:43 PM
GRAB VALUES FROM COLUMN A WHERE COLUMN C = 302 Gluefoot Excel Discussion (Misc queries) 1 May 19th 09 09:41 PM
A more elegant solution to grab a range? Charles Excel Programming 4 November 12th 06 01:11 AM
number grab David New Users to Excel 5 July 20th 06 10:45 PM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM


All times are GMT +1. The time now is 12:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"