Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default copy value from unopened workbook

is there a way to copy cell values from an unopened workbook and add that
value to an existing value in an opened workbook?

--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default copy value from unopened workbook

A linked cell can be created to an existing workbook with a formula like so:
What amazes me is how the formula text toggles automatically when that
external file is either open or not...
When it is open
='[Bill.xls]Sheet1'!$A$1
When you had it open but it has since been closed
='C:\[Bill.xls]Sheet1'!$A$1

Don't worry, as long as the link was validly created, if you close the
workbook with the formula first, then the external workbook, then open the
workbook with the formula again, the full path will appear.


"Gary Keramidas" wrote in message
...
is there a way to copy cell values from an unopened workbook and add that
value to an existing value in an opened workbook?

--


Gary





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default copy value from unopened workbook

activecell.formula = "=" & ActiveCell.Value &
"+'C:\myfolder[MyFile.xls]sheet1'!B9"
ActiveCell.Value = ActiveCell.Value

--
Regards,
Tom Ogilvy

"Gary Keramidas" wrote in message
...
is there a way to copy cell values from an unopened workbook and add that
value to an existing value in an opened workbook?

--


Gary





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default copy value from unopened workbook

thanks, i'll give it a shot

--


Gary


"Tom Ogilvy" wrote in message
...
activecell.formula = "=" & ActiveCell.Value &
"+'C:\myfolder[MyFile.xls]sheet1'!B9"
ActiveCell.Value = ActiveCell.Value

--
Regards,
Tom Ogilvy

"Gary Keramidas" wrote in message
...
is there a way to copy cell values from an unopened workbook and add that
value to an existing value in an opened workbook?

--


Gary







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default copy value from unopened workbook

OK, Tom, it's always me following up on your posts -- and for the second
time running it is about a command line I do not understand. Terribly sorry!

Why is the line: ActiveCell.Value = ActiveCell.Value required?

Thanks!

Bill

"Tom Ogilvy" wrote in message
...
activecell.formula = "=" & ActiveCell.Value &
"+'C:\myfolder[MyFile.xls]sheet1'!B9"
ActiveCell.Value = ActiveCell.Value

--
Regards,
Tom Ogilvy

"Gary Keramidas" wrote in message
...
is there a way to copy cell values from an unopened workbook and add that
value to an existing value in an opened workbook?

--


Gary









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default copy value from unopened workbook

NEvermind, I figured it out ... you are getting rid of the link... got it.

"William Benson" wrote in message
...
OK, Tom, it's always me following up on your posts -- and for the second
time running it is about a command line I do not understand. Terribly
sorry!

Why is the line: ActiveCell.Value = ActiveCell.Value required?

Thanks!

Bill

"Tom Ogilvy" wrote in message
...
activecell.formula = "=" & ActiveCell.Value &
"+'C:\myfolder[MyFile.xls]sheet1'!B9"
ActiveCell.Value = ActiveCell.Value

--
Regards,
Tom Ogilvy

"Gary Keramidas" wrote in message
...
is there a way to copy cell values from an unopened workbook and add
that
value to an existing value in an opened workbook?

--


Gary









  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default copy value from unopened workbook

Tom,

What would be the syntax if the worksheet name was 2 (or more) words,
such as "Last Year" instead of "Sheet1"?

I've tried various combinations of quotation marks, apostrophes and
brackets and can't seem to get it to work.

Thanks,
Paul

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default copy value from unopened workbook

Did you try:

activecell.formula = "=" & ActiveCell.Value &
"+'C:\myfolder[MyFile.xls]last year'!B9"

Sometimes, it's easiest to open that other workbook, build the formula
(manually). Then close the other workbook to see the syntax.

"Paul D. Simon" wrote:

Tom,

What would be the syntax if the worksheet name was 2 (or more) words,
such as "Last Year" instead of "Sheet1"?

I've tried various combinations of quotation marks, apostrophes and
brackets and can't seem to get it to work.

Thanks,
Paul


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default copy value from unopened workbook

<blush, i let out the "\" after myfolder.

activecell.formula = "=" & ActiveCell.Value &
"+'C:\myfolder\[My File.xls]Last Year'!B9"
ActiveCell.Value = ActiveCell.Value

sorry for the confusion.

--
Regards,
Tom Ogilvy



"Paul D. Simon" wrote in message
ups.com...
Tom,

What would be the syntax if the worksheet name was 2 (or more) words,
such as "Last Year" instead of "Sheet1"?

I've tried various combinations of quotation marks, apostrophes and
brackets and can't seem to get it to work.

Thanks,
Paul



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default copy value from unopened workbook

Oops. I should have learned to never trust Tom! <vvbg.

And I did build it manually, but just missed it!!

Dave Peterson wrote:

Did you try:

activecell.formula = "=" & ActiveCell.Value &
"+'C:\myfolder[MyFile.xls]last year'!B9"

Sometimes, it's easiest to open that other workbook, build the formula
(manually). Then close the other workbook to see the syntax.

"Paul D. Simon" wrote:

Tom,

What would be the syntax if the worksheet name was 2 (or more) words,
such as "Last Year" instead of "Sheet1"?

I've tried various combinations of quotation marks, apostrophes and
brackets and can't seem to get it to work.

Thanks,
Paul


--

Dave Peterson


--

Dave Peterson


  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default copy value from unopened workbook

Thanks very much. Works perfectly!

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
Unopened workbook H. Excel Discussion (Misc queries) 1 May 2nd 06 04:12 PM
copy from unopened workbook Emma Hope Excel Programming 2 July 29th 05 11:10 AM
Importing Data from unopened Workbook into an open Workbook GrayesGhost Excel Discussion (Misc queries) 0 March 5th 05 11:25 PM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM
Unopened workbook values Amuel Pouart Excel Programming 0 September 5th 03 04:00 PM


All times are GMT +1. The time now is 06:05 AM.

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"