Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Return portion of Formula?
Excel2003 ... Range D15:D54 now contains formulas similar to:
Cell D15 contains ... =MAX('Simpson, F'!R$15:R$300) Cell D16 contains ... =MAX('Clause, S'!R$15:R$300)) Cell D17 contains ... =MAX('Alonglastname, C'!R$15:R$300)) etc (Name of WS chgs on each Row) In Range A15:A54 ... I would like a Formula that will return the WS Name contained in formula Range D15:D54. A15 return "Simpson, F" A16 return "Clause, S" A17 return "Averylonglastname, C" Thanks ... Kha |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Return portion of Formula?
Try this one-line UDF:
Function sheetref(r As Range) As String sheetref = Split(r.Formula, "'")(1) End Function UDFs are very easy to install and use: 1. ALT-F11 brings up the VBE window 2. ALT-I ALT-M opens a fresh module 3. paste the stuff in and close the VBE window If you save the workbook, the UDF will be saved with it. To use the UDF from the normal Excel window, just enter it like a normal Excel Function, for example =sheetref(D15) To remove the UDF: 1. bring up the VBE window as above 2. clear the code out 3. close the VBE window To learn more about UDFs, see: http://www.cpearson.com/excel/Writin...ionsInVBA.aspx -- Gary''s Student - gsnu200824 "Ken" wrote: Excel2003 ... Range D15:D54 now contains formulas similar to: Cell D15 contains ... =MAX('Simpson, F'!R$15:R$300) Cell D16 contains ... =MAX('Clause, S'!R$15:R$300)) Cell D17 contains ... =MAX('Alonglastname, C'!R$15:R$300)) etc (Name of WS chgs on each Row) In Range A15:A54 ... I would like a Formula that will return the WS Name contained in formula Range D15:D54. A15 return "Simpson, F" A16 return "Clause, S" A17 return "Averylonglastname, C" Thanks ... Kha |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula to multiply only a portion of a cell number? | Excel Worksheet Functions | |||
Extract portion of formula resident in a cell | Excel Worksheet Functions | |||
A formula for moving a portion of a cell??? | Excel Discussion (Misc queries) | |||
return a portion of data entered into a cell | Excel Discussion (Misc queries) | |||
how do i extend the series of a portion of a formula? | Excel Worksheet Functions |