Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default VBA Index / match type formula copying formulas, not values

Simplyfying my problem an awful lot, I am trying to write a macro that
would take a certain table, look up the vertical code and horizontal
code of certain items, copy a link from those items, change it to
absolute refernce (which part I know how to do) then go to another
table, and paste the link to the appropriate cell (with the same
vertical and horizontal code-cooridinates), then change it back to
relative reference (which again I know how to do).

I know how to do the first part, but this is also only using INDEX /
MATCH, so returning a value, not an actual link.

I have been browsing my VBA books and the groups for quite a long time
trying to find a solution - to no avail.

I would greatly appreciate any help

Kuba
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBA Index / match type formula copying formulas, not values

It is unclear what the problem is. If you want to reference a value in Cell
B9, you put in a formula

set rng = Worksheets("Sheet1").Range("B9")
worksheets("Sheet2").Range("F32").Formula = "=" & rng.Address(0,0,,True)

I suspect you have two tables with the same row and column labels, but
perhaps in different order on each table - and you want to fill out table 2
with links back to the appropriate row and column intersection on table 1.
Is that what you want?

--
Regards,
Tom Ogilvy


"Kuba" wrote in message
om...
Simplyfying my problem an awful lot, I am trying to write a macro that
would take a certain table, look up the vertical code and horizontal
code of certain items, copy a link from those items, change it to
absolute refernce (which part I know how to do) then go to another
table, and paste the link to the appropriate cell (with the same
vertical and horizontal code-cooridinates), then change it back to
relative reference (which again I know how to do).

I know how to do the first part, but this is also only using INDEX /
MATCH, so returning a value, not an actual link.

I have been browsing my VBA books and the groups for quite a long time
trying to find a solution - to no avail.

I would greatly appreciate any help

Kuba



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Index / match type formula copying formulas, not values

Yes, I have two tables with almost the same row and column labels, which may be in different order. It is an input sheet for a financial model, which is connected to numerous sources. What I am after is not to link the new sheet to the old sheet, but to copy the formulas (i.e. links) of the old sheet into the respective places of the new sheet


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
Index and match formulas Jeanette Excel Discussion (Misc queries) 1 February 2nd 10 02:50 PM
A vlookup/index-match type problem Andrew Mackenzie Excel Discussion (Misc queries) 10 October 24th 09 10:24 AM
Copying index/ match formula LJoe Excel Worksheet Functions 2 June 27th 06 03:21 PM
Only text values matching using index/match lookup - data type pro Stanton Excel Worksheet Functions 1 August 2nd 05 01:05 AM
Looking for formula index/match-type that returns an array Tom Excel Worksheet Functions 1 April 1st 05 10:05 PM


All times are GMT +1. The time now is 06:52 PM.

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"