View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Kotuby[_2_] John Kotuby[_2_] is offline
external usenet poster
 
Posts: 3
Default How can I pull Cell value from Detail worksheet into Summary sheet?

Justin,
Thanks for your response...
Yes you understood correctly.
The product name (from which the Sheet name is derived) is in column A of
the line-item.
Apparently even if it is part of a Hyperlink, the displayed text will be
returned according to what I understand.

That gets me much closer to a solution!

I found that in some cases there were very long product names that produced
duplicate Sheet names when the names were truncated at 31 characters. Since
duplicate Sheet names are not allowed I prefixed the Sheetname whith the
Line Item number and then performed Left(strSheetName, 31) to truncate the
name to 31 characters.

An example (just for discussion)....

Product 1: Maple Syrup Produced in Southern Vermont
Product 2: Maple Syrup Produced in Southern Maine

If these Product names were trimmed to 31 characters they would both be
"Maple Syrup Produced in Souther"

So (from within the VB application that creates the initial Workbook) I
created worksheet names like this.
Below the variable strName will hold the fianl worksheet name and
strProductName contains "Maple Syrup Produced in Southern Vermont"

strWSName = "(1) " + strProductName

strWSName = Left(strWSName, 31)

So it becomes a bit more complicated, but we are getting there.

Thanks again...

"Justin Case" wrote in message
...

Hi John,

Can you clarify this...

"The Product name resides on the Summary sheet in the first Cell in
the
line-item row I am working with, but it is in a HyperLink. "

If the sheet names correspond directly a cell entry (i.e. the
hyperlink says "Cogs" and the sheet is named exactly the same) you can
use the INDIRECT function to get information from the detail sheets.
The formula would look something like this:

=INDIRECT(A3&"!A4")

If A3 contains the hyperlink COGS then the formula will return the
contents of cell A4 on the corresponding Detail sheet.

Hope I've interpreted the above sentence correctly....