View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Marco to change formula according to what is written in the ce

Please try the below

A1 = "Brisbane Metro"
A3 = INDIRECT("'" & A1&"'!G12")
now A3 should return the value of G12 from Tab "Brisbane Metro"

Now change A1 to "Gold Coast". Now the below formula will return the value
of G12 from Tab 'Gold Coast'.
A3 = INDIRECT("'" & A1 &"'!G12")


If this post helps click Yes
---------------
Jacob Skaria


"Harn88" wrote:

Dear Jacob

Thank you for your reply

='Brisbane Metro'!G12 is referring to a worksheet Tab, so "Brisbane Metro"
is a tab in the workbook. Gold Coast is also another tab in a workbook.

I want to be able to replace ='Brisbane Metro'!G12 tab to ='Gold Coast'!G12
tab and return the number in that tab.

In another word I want a Marco to replace the word 'Brisbane Metro' to 'Gold
Coast' According to what input in a cell for example A1.

I hope I explain it well, please let me know if you need more information

Thank you very much!

Best regards,

Harn