Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Scratching Head!

Hi...

I have 50 files that contain 250 values that I want to capture in one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that lists the
directory/path of the 50 files but indirect and indirect.ext is not working.
Any other ideas.

Thanks in advance

Gordon...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Scratching Head!

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they need to be found?

There are many ways to make the summary. Do you want links? Do you want values that don't change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture in one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that lists the
directory/path of the 50 files but indirect and indirect.ext is not working.
Any other ideas.

Thanks in advance

Gordon...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Scratching Head!

Hi...

250 values per file, in exactly the same cells. The files are randomly
named, though inside each file in a fixed cell there is a random string
containing a random product number; I have been able to extract both the file
path for each file and the random product number within the random string.

I had tried to map the table using indirect.ext but I just get #value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or brackets into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they need to be found?

There are many ways to make the summary. Do you want links? Do you want values that don't change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture in one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that lists the
directory/path of the 50 files but indirect and indirect.ext is not working.
Any other ideas.

Thanks in advance

Gordon...




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Scratching Head!

OK.For your example: C:\Desktop\Raw\hammer.xlsSheet1!j12

In cell A2, enter your folder path:

C:\Desktop\Raw

In cell B2, enter your file name:
hammer.xls

In cell C2, enter your sheetname
Sheet1

Create 1 line for each of the files - you could use your current list for this.

And in cell D1, enter your cell address or name that you want to create the link to.
J12

Then starting in E1 and going across row 1, enter all the cell addresses or names of interest.

Then select (for our example, D2:the last cell of your new table) your 'blank' table, and run this
macro:

Sub MakeLinksForGordon()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='" & Cells(myCell.Row, 1).Value & "\[" & _
Cells(myCell.Row, 2) & "]" & _
Cells(myCell.Row, 3) & "'!" & _
Cells(1, myCell.Column)
Next myCell
End Sub

And viola, your links:

='C:\Desktop\Raw\[hammer.xls]Sheet1'!J12

are created.

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

250 values per file, in exactly the same cells. The files are randomly
named, though inside each file in a fixed cell there is a random string
containing a random product number; I have been able to extract both the file
path for each file and the random product number within the random string.

I had tried to map the table using indirect.ext but I just get #value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or brackets into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they need to be found?

There are many ways to make the summary. Do you want links? Do you want values that don't
change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture in one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that lists the
directory/path of the 50 files but indirect and indirect.ext is not working.
Any other ideas.

Thanks in advance

Gordon...






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Scratching Head!

ok...this is great. Just one last thing I need...

How would you seperate my already established paths (currently in column A),
so I can rejoin them with your code to include brackets and single commas,
which will then work with indirect.ext

eg

C:\Desktop\Raw\hammer.xlsSheet1!j12

into

C:\Desktop\Raw
hammer.xls
sheet1
j12

Thanks. I did think this would be impossible but you MVP's never fail me.

Gordon


"Bernie Deitrick" wrote:

OK.For your example: C:\Desktop\Raw\hammer.xlsSheet1!j12

In cell A2, enter your folder path:

C:\Desktop\Raw

In cell B2, enter your file name:
hammer.xls

In cell C2, enter your sheetname
Sheet1

Create 1 line for each of the files - you could use your current list for this.

And in cell D1, enter your cell address or name that you want to create the link to.
J12

Then starting in E1 and going across row 1, enter all the cell addresses or names of interest.

Then select (for our example, D2:the last cell of your new table) your 'blank' table, and run this
macro:

Sub MakeLinksForGordon()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='" & Cells(myCell.Row, 1).Value & "\[" & _
Cells(myCell.Row, 2) & "]" & _
Cells(myCell.Row, 3) & "'!" & _
Cells(1, myCell.Column)
Next myCell
End Sub

And viola, your links:

='C:\Desktop\Raw\[hammer.xls]Sheet1'!J12

are created.

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

250 values per file, in exactly the same cells. The files are randomly
named, though inside each file in a fixed cell there is a random string
containing a random product number; I have been able to extract both the file
path for each file and the random product number within the random string.

I had tried to map the table using indirect.ext but I just get #value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or brackets into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they need to be found?

There are many ways to make the summary. Do you want links? Do you want values that don't
change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture in one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that lists the
directory/path of the 50 files but indirect and indirect.ext is not working.
Any other ideas.

Thanks in advance

Gordon...









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Scratching Head!

Gordon,

With your string (C:\Desktop\Raw\hammer.xlsSheet1!j12) in cell A2:

In cell B2:
=MID(A2,FIND("#",SUBSTITUTE(A2,"\","#",LEN(A2)-LEN(SUBSTITUTE(A2,"\",""))),1)+1,200)

In cell C2:
=SUBSTITUTE(A2,"\" &B2,"")

In cell D2:
=LEFT(B2,FIND(".xls",B2)+3)

In cell E2:
=LEFT(SUBSTITUTE(B2,D2,""),FIND("!",SUBSTITUTE(B2, D2,""))-1)

In cell F2:
=MID(B2,FIND("!",B2)+1,200)

Copy these down to match your list, convert the formulas to values, and delete columns A and B. Not
sure what to do after that - depends on the population of your list (is it all 12,500 links?)


HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
ok...this is great. Just one last thing I need...

How would you seperate my already established paths (currently in column A),
so I can rejoin them with your code to include brackets and single commas,
which will then work with indirect.ext

eg

C:\Desktop\Raw\hammer.xlsSheet1!j12

into

C:\Desktop\Raw
hammer.xls
sheet1
j12

Thanks. I did think this would be impossible but you MVP's never fail me.

Gordon


"Bernie Deitrick" wrote:

OK.For your example: C:\Desktop\Raw\hammer.xlsSheet1!j12

In cell A2, enter your folder path:

C:\Desktop\Raw

In cell B2, enter your file name:
hammer.xls

In cell C2, enter your sheetname
Sheet1

Create 1 line for each of the files - you could use your current list for this.

And in cell D1, enter your cell address or name that you want to create the link to.
J12

Then starting in E1 and going across row 1, enter all the cell addresses or names of interest.

Then select (for our example, D2:the last cell of your new table) your 'blank' table, and run
this
macro:

Sub MakeLinksForGordon()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='" & Cells(myCell.Row, 1).Value & "\[" & _
Cells(myCell.Row, 2) & "]" & _
Cells(myCell.Row, 3) & "'!" & _
Cells(1, myCell.Column)
Next myCell
End Sub

And viola, your links:

='C:\Desktop\Raw\[hammer.xls]Sheet1'!J12

are created.

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

250 values per file, in exactly the same cells. The files are randomly
named, though inside each file in a fixed cell there is a random string
containing a random product number; I have been able to extract both the file
path for each file and the random product number within the random string.

I had tried to map the table using indirect.ext but I just get #value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or brackets into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they need to be found?

There are many ways to make the summary. Do you want links? Do you want values that don't
change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture in one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that lists the
directory/path of the 50 files but indirect and indirect.ext is not working.
Any other ideas.

Thanks in advance

Gordon...









  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Scratching Head!

Once I get the first line done then I hope to fill down. Fingers crossed.
You've earned your dinner tonight...thanks.

"Bernie Deitrick" wrote:

Gordon,

With your string (C:\Desktop\Raw\hammer.xlsSheet1!j12) in cell A2:

In cell B2:
=MID(A2,FIND("#",SUBSTITUTE(A2,"\","#",LEN(A2)-LEN(SUBSTITUTE(A2,"\",""))),1)+1,200)

In cell C2:
=SUBSTITUTE(A2,"\" &B2,"")

In cell D2:
=LEFT(B2,FIND(".xls",B2)+3)

In cell E2:
=LEFT(SUBSTITUTE(B2,D2,""),FIND("!",SUBSTITUTE(B2, D2,""))-1)

In cell F2:
=MID(B2,FIND("!",B2)+1,200)

Copy these down to match your list, convert the formulas to values, and delete columns A and B. Not
sure what to do after that - depends on the population of your list (is it all 12,500 links?)


HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
ok...this is great. Just one last thing I need...

How would you seperate my already established paths (currently in column A),
so I can rejoin them with your code to include brackets and single commas,
which will then work with indirect.ext

eg

C:\Desktop\Raw\hammer.xlsSheet1!j12

into

C:\Desktop\Raw
hammer.xls
sheet1
j12

Thanks. I did think this would be impossible but you MVP's never fail me.

Gordon


"Bernie Deitrick" wrote:

OK.For your example: C:\Desktop\Raw\hammer.xlsSheet1!j12

In cell A2, enter your folder path:

C:\Desktop\Raw

In cell B2, enter your file name:
hammer.xls

In cell C2, enter your sheetname
Sheet1

Create 1 line for each of the files - you could use your current list for this.

And in cell D1, enter your cell address or name that you want to create the link to.
J12

Then starting in E1 and going across row 1, enter all the cell addresses or names of interest.

Then select (for our example, D2:the last cell of your new table) your 'blank' table, and run
this
macro:

Sub MakeLinksForGordon()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='" & Cells(myCell.Row, 1).Value & "\[" & _
Cells(myCell.Row, 2) & "]" & _
Cells(myCell.Row, 3) & "'!" & _
Cells(1, myCell.Column)
Next myCell
End Sub

And viola, your links:

='C:\Desktop\Raw\[hammer.xls]Sheet1'!J12

are created.

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

250 values per file, in exactly the same cells. The files are randomly
named, though inside each file in a fixed cell there is a random string
containing a random product number; I have been able to extract both the file
path for each file and the random product number within the random string.

I had tried to map the table using indirect.ext but I just get #value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or brackets into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they need to be found?

There are many ways to make the summary. Do you want links? Do you want values that don't
change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture in one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that lists the
directory/path of the 50 files but indirect and indirect.ext is not working.
Any other ideas.

Thanks in advance

Gordon...










  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Scratching Head!

Hi...

All worked swell until the last bit. I need to clarify two statements:

You wrote: Then starting in E1 and going across row 1, enter all the cell
addresses or names of interest. Do you mean just the cell address (J12 J13
J38 etc) or the whole path/address c:\desktop etc etc.

You wrote: Then select (for our example, D2:the last cell of your new table)
your 'blank' table, and run macro. Does this go into a module, workbook or
the sheet code. I get an error when I run it: Run Time Error 1004
Application-Defined or object defined error...

Any clues...so close I can smell it.

Gordon...

"Bernie Deitrick" wrote:

Gordon,

With your string (C:\Desktop\Raw\hammer.xlsSheet1!j12) in cell A2:

In cell B2:
=MID(A2,FIND("#",SUBSTITUTE(A2,"\","#",LEN(A2)-LEN(SUBSTITUTE(A2,"\",""))),1)+1,200)

In cell C2:
=SUBSTITUTE(A2,"\" &B2,"")

In cell D2:
=LEFT(B2,FIND(".xls",B2)+3)

In cell E2:
=LEFT(SUBSTITUTE(B2,D2,""),FIND("!",SUBSTITUTE(B2, D2,""))-1)

In cell F2:
=MID(B2,FIND("!",B2)+1,200)

Copy these down to match your list, convert the formulas to values, and delete columns A and B. Not
sure what to do after that - depends on the population of your list (is it all 12,500 links?)


HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
ok...this is great. Just one last thing I need...

How would you seperate my already established paths (currently in column A),
so I can rejoin them with your code to include brackets and single commas,
which will then work with indirect.ext

eg

C:\Desktop\Raw\hammer.xlsSheet1!j12

into

C:\Desktop\Raw
hammer.xls
sheet1
j12

Thanks. I did think this would be impossible but you MVP's never fail me.

Gordon


"Bernie Deitrick" wrote:

OK.For your example: C:\Desktop\Raw\hammer.xlsSheet1!j12

In cell A2, enter your folder path:

C:\Desktop\Raw

In cell B2, enter your file name:
hammer.xls

In cell C2, enter your sheetname
Sheet1

Create 1 line for each of the files - you could use your current list for this.

And in cell D1, enter your cell address or name that you want to create the link to.
J12

Then starting in E1 and going across row 1, enter all the cell addresses or names of interest.

Then select (for our example, D2:the last cell of your new table) your 'blank' table, and run
this
macro:

Sub MakeLinksForGordon()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='" & Cells(myCell.Row, 1).Value & "\[" & _
Cells(myCell.Row, 2) & "]" & _
Cells(myCell.Row, 3) & "'!" & _
Cells(1, myCell.Column)
Next myCell
End Sub

And viola, your links:

='C:\Desktop\Raw\[hammer.xls]Sheet1'!J12

are created.

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

250 values per file, in exactly the same cells. The files are randomly
named, though inside each file in a fixed cell there is a random string
containing a random product number; I have been able to extract both the file
path for each file and the random product number within the random string.

I had tried to map the table using indirect.ext but I just get #value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or brackets into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they need to be found?

There are many ways to make the summary. Do you want links? Do you want values that don't
change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture in one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that lists the
directory/path of the 50 files but indirect and indirect.ext is not working.
Any other ideas.

Thanks in advance

Gordon...










  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Scratching Head!

Gordon,

Just the cell address goes into row 1.

The macro goes into a codemodule in your workbook.

There are many good guides concerning getting started with macros: Here's
one that I often refer folks to:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

The blank cells that you select must have filled in columns A:C in the same
row, and a cell address in row 1 of the same column. You will get that
error if the formula that is being created is invalid.

HTH,
Bernie
MS Excel MVP



"Gordon" wrote in message
...
Hi...

All worked swell until the last bit. I need to clarify two statements:

You wrote: Then starting in E1 and going across row 1, enter all the cell
addresses or names of interest. Do you mean just the cell address (J12 J13
J38 etc) or the whole path/address c:\desktop etc etc.

You wrote: Then select (for our example, D2:the last cell of your new
table)
your 'blank' table, and run macro. Does this go into a module, workbook or
the sheet code. I get an error when I run it: Run Time Error 1004
Application-Defined or object defined error...

Any clues...so close I can smell it.

Gordon...

"Bernie Deitrick" wrote:

Gordon,

With your string (C:\Desktop\Raw\hammer.xlsSheet1!j12) in cell A2:

In cell B2:
=MID(A2,FIND("#",SUBSTITUTE(A2,"\","#",LEN(A2)-LEN(SUBSTITUTE(A2,"\",""))),1)+1,200)

In cell C2:
=SUBSTITUTE(A2,"\" &B2,"")

In cell D2:
=LEFT(B2,FIND(".xls",B2)+3)

In cell E2:
=LEFT(SUBSTITUTE(B2,D2,""),FIND("!",SUBSTITUTE(B2, D2,""))-1)

In cell F2:
=MID(B2,FIND("!",B2)+1,200)

Copy these down to match your list, convert the formulas to values, and
delete columns A and B. Not
sure what to do after that - depends on the population of your list (is
it all 12,500 links?)


HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
ok...this is great. Just one last thing I need...

How would you seperate my already established paths (currently in
column A),
so I can rejoin them with your code to include brackets and single
commas,
which will then work with indirect.ext

eg

C:\Desktop\Raw\hammer.xlsSheet1!j12

into

C:\Desktop\Raw
hammer.xls
sheet1
j12

Thanks. I did think this would be impossible but you MVP's never fail
me.

Gordon


"Bernie Deitrick" wrote:

OK.For your example: C:\Desktop\Raw\hammer.xlsSheet1!j12

In cell A2, enter your folder path:

C:\Desktop\Raw

In cell B2, enter your file name:
hammer.xls

In cell C2, enter your sheetname
Sheet1

Create 1 line for each of the files - you could use your current list
for this.

And in cell D1, enter your cell address or name that you want to
create the link to.
J12

Then starting in E1 and going across row 1, enter all the cell
addresses or names of interest.

Then select (for our example, D2:the last cell of your new table) your
'blank' table, and run
this
macro:

Sub MakeLinksForGordon()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='" & Cells(myCell.Row, 1).Value & "\[" & _
Cells(myCell.Row, 2) & "]" & _
Cells(myCell.Row, 3) & "'!" & _
Cells(1, myCell.Column)
Next myCell
End Sub

And viola, your links:

='C:\Desktop\Raw\[hammer.xls]Sheet1'!J12

are created.

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

250 values per file, in exactly the same cells. The files are
randomly
named, though inside each file in a fixed cell there is a random
string
containing a random product number; I have been able to extract both
the file
path for each file and the random product number within the random
string.

I had tried to map the table using indirect.ext but I just get
#value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or brackets
into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they
need to be found?

There are many ways to make the summary. Do you want links? Do you
want values that don't
change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture in
one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that
lists the
directory/path of the 50 files but indirect and indirect.ext is
not working.
Any other ideas.

Thanks in advance

Gordon...












  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Scratching Head!

Hi Bernie...

Thanks for all your help so far. Try and try as I might I just can't get
this thing to work. I know this might sound cheeky, but is there any chance
that you have a working example of this onto which I can transpose my own
data. I appreciate that this might be beyond your brief but I would
appreciate it massively...

Many thanks...

Gordon...



"Bernie Deitrick" wrote:

Gordon,

Just the cell address goes into row 1.

The macro goes into a codemodule in your workbook.

There are many good guides concerning getting started with macros: Here's
one that I often refer folks to:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

The blank cells that you select must have filled in columns A:C in the same
row, and a cell address in row 1 of the same column. You will get that
error if the formula that is being created is invalid.

HTH,
Bernie
MS Excel MVP



"Gordon" wrote in message
...
Hi...

All worked swell until the last bit. I need to clarify two statements:

You wrote: Then starting in E1 and going across row 1, enter all the cell
addresses or names of interest. Do you mean just the cell address (J12 J13
J38 etc) or the whole path/address c:\desktop etc etc.

You wrote: Then select (for our example, D2:the last cell of your new
table)
your 'blank' table, and run macro. Does this go into a module, workbook or
the sheet code. I get an error when I run it: Run Time Error 1004
Application-Defined or object defined error...

Any clues...so close I can smell it.

Gordon...

"Bernie Deitrick" wrote:

Gordon,

With your string (C:\Desktop\Raw\hammer.xlsSheet1!j12) in cell A2:

In cell B2:
=MID(A2,FIND("#",SUBSTITUTE(A2,"\","#",LEN(A2)-LEN(SUBSTITUTE(A2,"\",""))),1)+1,200)

In cell C2:
=SUBSTITUTE(A2,"\" &B2,"")

In cell D2:
=LEFT(B2,FIND(".xls",B2)+3)

In cell E2:
=LEFT(SUBSTITUTE(B2,D2,""),FIND("!",SUBSTITUTE(B2, D2,""))-1)

In cell F2:
=MID(B2,FIND("!",B2)+1,200)

Copy these down to match your list, convert the formulas to values, and
delete columns A and B. Not
sure what to do after that - depends on the population of your list (is
it all 12,500 links?)


HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
ok...this is great. Just one last thing I need...

How would you seperate my already established paths (currently in
column A),
so I can rejoin them with your code to include brackets and single
commas,
which will then work with indirect.ext

eg

C:\Desktop\Raw\hammer.xlsSheet1!j12

into

C:\Desktop\Raw
hammer.xls
sheet1
j12

Thanks. I did think this would be impossible but you MVP's never fail
me.

Gordon


"Bernie Deitrick" wrote:

OK.For your example: C:\Desktop\Raw\hammer.xlsSheet1!j12

In cell A2, enter your folder path:

C:\Desktop\Raw

In cell B2, enter your file name:
hammer.xls

In cell C2, enter your sheetname
Sheet1

Create 1 line for each of the files - you could use your current list
for this.

And in cell D1, enter your cell address or name that you want to
create the link to.
J12

Then starting in E1 and going across row 1, enter all the cell
addresses or names of interest.

Then select (for our example, D2:the last cell of your new table) your
'blank' table, and run
this
macro:

Sub MakeLinksForGordon()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='" & Cells(myCell.Row, 1).Value & "\[" & _
Cells(myCell.Row, 2) & "]" & _
Cells(myCell.Row, 3) & "'!" & _
Cells(1, myCell.Column)
Next myCell
End Sub

And viola, your links:

='C:\Desktop\Raw\[hammer.xls]Sheet1'!J12

are created.

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

250 values per file, in exactly the same cells. The files are
randomly
named, though inside each file in a fixed cell there is a random
string
containing a random product number; I have been able to extract both
the file
path for each file and the random product number within the random
string.

I had tried to map the table using indirect.ext but I just get
#value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or brackets
into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they
need to be found?

There are many ways to make the summary. Do you want links? Do you
want values that don't
change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture in
one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that
lists the
directory/path of the 50 files but indirect and indirect.ext is
not working.
Any other ideas.

Thanks in advance

Gordon...















  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Scratching Head!

I'll semd it to you in the morning (New York morning, that is)

Bernie


"Gordon" wrote in message
...
Hi Bernie...

Thanks for all your help so far. Try and try as I might I just can't get
this thing to work. I know this might sound cheeky, but is there any
chance
that you have a working example of this onto which I can transpose my own
data. I appreciate that this might be beyond your brief but I would
appreciate it massively...

Many thanks...

Gordon...



"Bernie Deitrick" wrote:

Gordon,

Just the cell address goes into row 1.

The macro goes into a codemodule in your workbook.

There are many good guides concerning getting started with macros: Here's
one that I often refer folks to:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

The blank cells that you select must have filled in columns A:C in the
same
row, and a cell address in row 1 of the same column. You will get that
error if the formula that is being created is invalid.

HTH,
Bernie
MS Excel MVP



"Gordon" wrote in message
...
Hi...

All worked swell until the last bit. I need to clarify two statements:

You wrote: Then starting in E1 and going across row 1, enter all the
cell
addresses or names of interest. Do you mean just the cell address (J12
J13
J38 etc) or the whole path/address c:\desktop etc etc.

You wrote: Then select (for our example, D2:the last cell of your new
table)
your 'blank' table, and run macro. Does this go into a module, workbook
or
the sheet code. I get an error when I run it: Run Time Error 1004
Application-Defined or object defined error...

Any clues...so close I can smell it.

Gordon...

"Bernie Deitrick" wrote:

Gordon,

With your string (C:\Desktop\Raw\hammer.xlsSheet1!j12) in cell A2:

In cell B2:
=MID(A2,FIND("#",SUBSTITUTE(A2,"\","#",LEN(A2)-LEN(SUBSTITUTE(A2,"\",""))),1)+1,200)

In cell C2:
=SUBSTITUTE(A2,"\" &B2,"")

In cell D2:
=LEFT(B2,FIND(".xls",B2)+3)

In cell E2:
=LEFT(SUBSTITUTE(B2,D2,""),FIND("!",SUBSTITUTE(B2, D2,""))-1)

In cell F2:
=MID(B2,FIND("!",B2)+1,200)

Copy these down to match your list, convert the formulas to values,
and
delete columns A and B. Not
sure what to do after that - depends on the population of your list
(is
it all 12,500 links?)


HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
ok...this is great. Just one last thing I need...

How would you seperate my already established paths (currently in
column A),
so I can rejoin them with your code to include brackets and single
commas,
which will then work with indirect.ext

eg

C:\Desktop\Raw\hammer.xlsSheet1!j12

into

C:\Desktop\Raw
hammer.xls
sheet1
j12

Thanks. I did think this would be impossible but you MVP's never
fail
me.

Gordon


"Bernie Deitrick" wrote:

OK.For your example: C:\Desktop\Raw\hammer.xlsSheet1!j12

In cell A2, enter your folder path:

C:\Desktop\Raw

In cell B2, enter your file name:
hammer.xls

In cell C2, enter your sheetname
Sheet1

Create 1 line for each of the files - you could use your current
list
for this.

And in cell D1, enter your cell address or name that you want to
create the link to.
J12

Then starting in E1 and going across row 1, enter all the cell
addresses or names of interest.

Then select (for our example, D2:the last cell of your new table)
your
'blank' table, and run
this
macro:

Sub MakeLinksForGordon()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='" & Cells(myCell.Row, 1).Value & "\[" & _
Cells(myCell.Row, 2) & "]" & _
Cells(myCell.Row, 3) & "'!" & _
Cells(1, myCell.Column)
Next myCell
End Sub

And viola, your links:

='C:\Desktop\Raw\[hammer.xls]Sheet1'!J12

are created.

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

250 values per file, in exactly the same cells. The files are
randomly
named, though inside each file in a fixed cell there is a random
string
containing a random product number; I have been able to extract
both
the file
path for each file and the random product number within the
random
string.

I had tried to map the table using indirect.ext but I just get
#value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or
brackets
into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they
need to be found?

There are many ways to make the summary. Do you want links? Do
you
want values that don't
change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture
in
one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that
lists the
directory/path of the 50 files but indirect and indirect.ext
is
not working.
Any other ideas.

Thanks in advance

Gordon...















  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Scratching Head!

Birnie...

Many thanks. Look forward to receiving it.

Gordon...

Bright and Sunny in Kendal UK

"Bernie Deitrick" wrote:

I'll semd it to you in the morning (New York morning, that is)

Bernie


"Gordon" wrote in message
...
Hi Bernie...

Thanks for all your help so far. Try and try as I might I just can't get
this thing to work. I know this might sound cheeky, but is there any
chance
that you have a working example of this onto which I can transpose my own
data. I appreciate that this might be beyond your brief but I would
appreciate it massively...

Many thanks...

Gordon...



"Bernie Deitrick" wrote:

Gordon,

Just the cell address goes into row 1.

The macro goes into a codemodule in your workbook.

There are many good guides concerning getting started with macros: Here's
one that I often refer folks to:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

The blank cells that you select must have filled in columns A:C in the
same
row, and a cell address in row 1 of the same column. You will get that
error if the formula that is being created is invalid.

HTH,
Bernie
MS Excel MVP



"Gordon" wrote in message
...
Hi...

All worked swell until the last bit. I need to clarify two statements:

You wrote: Then starting in E1 and going across row 1, enter all the
cell
addresses or names of interest. Do you mean just the cell address (J12
J13
J38 etc) or the whole path/address c:\desktop etc etc.

You wrote: Then select (for our example, D2:the last cell of your new
table)
your 'blank' table, and run macro. Does this go into a module, workbook
or
the sheet code. I get an error when I run it: Run Time Error 1004
Application-Defined or object defined error...

Any clues...so close I can smell it.

Gordon...

"Bernie Deitrick" wrote:

Gordon,

With your string (C:\Desktop\Raw\hammer.xlsSheet1!j12) in cell A2:

In cell B2:
=MID(A2,FIND("#",SUBSTITUTE(A2,"\","#",LEN(A2)-LEN(SUBSTITUTE(A2,"\",""))),1)+1,200)

In cell C2:
=SUBSTITUTE(A2,"\" &B2,"")

In cell D2:
=LEFT(B2,FIND(".xls",B2)+3)

In cell E2:
=LEFT(SUBSTITUTE(B2,D2,""),FIND("!",SUBSTITUTE(B2, D2,""))-1)

In cell F2:
=MID(B2,FIND("!",B2)+1,200)

Copy these down to match your list, convert the formulas to values,
and
delete columns A and B. Not
sure what to do after that - depends on the population of your list
(is
it all 12,500 links?)


HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
ok...this is great. Just one last thing I need...

How would you seperate my already established paths (currently in
column A),
so I can rejoin them with your code to include brackets and single
commas,
which will then work with indirect.ext

eg

C:\Desktop\Raw\hammer.xlsSheet1!j12

into

C:\Desktop\Raw
hammer.xls
sheet1
j12

Thanks. I did think this would be impossible but you MVP's never
fail
me.

Gordon


"Bernie Deitrick" wrote:

OK.For your example: C:\Desktop\Raw\hammer.xlsSheet1!j12

In cell A2, enter your folder path:

C:\Desktop\Raw

In cell B2, enter your file name:
hammer.xls

In cell C2, enter your sheetname
Sheet1

Create 1 line for each of the files - you could use your current
list
for this.

And in cell D1, enter your cell address or name that you want to
create the link to.
J12

Then starting in E1 and going across row 1, enter all the cell
addresses or names of interest.

Then select (for our example, D2:the last cell of your new table)
your
'blank' table, and run
this
macro:

Sub MakeLinksForGordon()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='" & Cells(myCell.Row, 1).Value & "\[" & _
Cells(myCell.Row, 2) & "]" & _
Cells(myCell.Row, 3) & "'!" & _
Cells(1, myCell.Column)
Next myCell
End Sub

And viola, your links:

='C:\Desktop\Raw\[hammer.xls]Sheet1'!J12

are created.

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

250 values per file, in exactly the same cells. The files are
randomly
named, though inside each file in a fixed cell there is a random
string
containing a random product number; I have been able to extract
both
the file
path for each file and the random product number within the
random
string.

I had tried to map the table using indirect.ext but I just get
#value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or
brackets
into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they
need to be found?

There are many ways to make the summary. Do you want links? Do
you
want values that don't
change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture
in
one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that
lists the
directory/path of the 50 files but indirect and indirect.ext
is
not working.
Any other ideas.

Thanks in advance

Gordon...
















  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Scratching Head!

Just sent it...

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Birnie...

Many thanks. Look forward to receiving it.

Gordon...

Bright and Sunny in Kendal UK

"Bernie Deitrick" wrote:

I'll semd it to you in the morning (New York morning, that is)

Bernie


"Gordon" wrote in message
...
Hi Bernie...

Thanks for all your help so far. Try and try as I might I just can't get
this thing to work. I know this might sound cheeky, but is there any
chance
that you have a working example of this onto which I can transpose my own
data. I appreciate that this might be beyond your brief but I would
appreciate it massively...

Many thanks...

Gordon...



"Bernie Deitrick" wrote:

Gordon,

Just the cell address goes into row 1.

The macro goes into a codemodule in your workbook.

There are many good guides concerning getting started with macros: Here's
one that I often refer folks to:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

The blank cells that you select must have filled in columns A:C in the
same
row, and a cell address in row 1 of the same column. You will get that
error if the formula that is being created is invalid.

HTH,
Bernie
MS Excel MVP



"Gordon" wrote in message
...
Hi...

All worked swell until the last bit. I need to clarify two statements:

You wrote: Then starting in E1 and going across row 1, enter all the
cell
addresses or names of interest. Do you mean just the cell address (J12
J13
J38 etc) or the whole path/address c:\desktop etc etc.

You wrote: Then select (for our example, D2:the last cell of your new
table)
your 'blank' table, and run macro. Does this go into a module, workbook
or
the sheet code. I get an error when I run it: Run Time Error 1004
Application-Defined or object defined error...

Any clues...so close I can smell it.

Gordon...

"Bernie Deitrick" wrote:

Gordon,

With your string (C:\Desktop\Raw\hammer.xlsSheet1!j12) in cell A2:

In cell B2:
=MID(A2,FIND("#",SUBSTITUTE(A2,"\","#",LEN(A2)-LEN(SUBSTITUTE(A2,"\",""))),1)+1,200)

In cell C2:
=SUBSTITUTE(A2,"\" &B2,"")

In cell D2:
=LEFT(B2,FIND(".xls",B2)+3)

In cell E2:
=LEFT(SUBSTITUTE(B2,D2,""),FIND("!",SUBSTITUTE(B2, D2,""))-1)

In cell F2:
=MID(B2,FIND("!",B2)+1,200)

Copy these down to match your list, convert the formulas to values,
and
delete columns A and B. Not
sure what to do after that - depends on the population of your list
(is
it all 12,500 links?)


HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
ok...this is great. Just one last thing I need...

How would you seperate my already established paths (currently in
column A),
so I can rejoin them with your code to include brackets and single
commas,
which will then work with indirect.ext

eg

C:\Desktop\Raw\hammer.xlsSheet1!j12

into

C:\Desktop\Raw
hammer.xls
sheet1
j12

Thanks. I did think this would be impossible but you MVP's never
fail
me.

Gordon


"Bernie Deitrick" wrote:

OK.For your example: C:\Desktop\Raw\hammer.xlsSheet1!j12

In cell A2, enter your folder path:

C:\Desktop\Raw

In cell B2, enter your file name:
hammer.xls

In cell C2, enter your sheetname
Sheet1

Create 1 line for each of the files - you could use your current
list
for this.

And in cell D1, enter your cell address or name that you want to
create the link to.
J12

Then starting in E1 and going across row 1, enter all the cell
addresses or names of interest.

Then select (for our example, D2:the last cell of your new table)
your
'blank' table, and run
this
macro:

Sub MakeLinksForGordon()
Dim myCell As Range

For Each myCell In Selection
myCell.Formula = _
"='" & Cells(myCell.Row, 1).Value & "\[" & _
Cells(myCell.Row, 2) & "]" & _
Cells(myCell.Row, 3) & "'!" & _
Cells(1, myCell.Column)
Next myCell
End Sub

And viola, your links:

='C:\Desktop\Raw\[hammer.xls]Sheet1'!J12

are created.

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

250 values per file, in exactly the same cells. The files are
randomly
named, though inside each file in a fixed cell there is a random
string
containing a random product number; I have been able to extract
both
the file
path for each file and the random product number within the
random
string.

I had tried to map the table using indirect.ext but I just get
#value. The
problem is that the string I have is;

C:\Desktop\Raw\hammer.xlsSheet1!j12

and I don't know how to get the single quotation marks or
brackets
into the
formula as it should look below. But it doesn't work anyway.

=INDIRECT.EXT('C:\Desktop\Raw\[hammer.xls]Sheet1'!j12)

Happy for links or values that don't change.

Thanks for your help so far.

Gordon

"Bernie Deitrick" wrote:

Gordon,

Are there 250 values per file, or 5 from each of 50 files?

Are the values on the same sheet (by name) and cell, or do they
need to be found?

There are many ways to make the summary. Do you want links? Do
you
want values that don't
change?

HTH,
Bernie
MS Excel MVP


"Gordon" wrote in message
...
Hi...

I have 50 files that contain 250 values that I want to capture
in
one file -
capture.xls in a table.

So far I have been able to create a column in capture.xls that
lists the
directory/path of the 50 files but indirect and indirect.ext
is
not working.
Any other ideas.

Thanks in advance

Gordon...


















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
In Over My Head JSnow Excel Discussion (Misc queries) 2 January 17th 09 12:03 AM
over my head James Excel Discussion (Misc queries) 5 June 24th 08 10:06 AM
Head to head Noob Jedi Excel Discussion (Misc queries) 3 August 31st 07 11:26 PM
Cant get my head around this one mbys14932 Excel Worksheet Functions 7 June 9th 06 05:23 PM
I'm over my head on this one... ChuckF Excel Programming 1 April 6th 06 09:11 PM


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

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

About Us

"It's about Microsoft Excel"