Extract Column Letter from Cell Reference in another Cell
Hi
I have a cell with references another sheet in the same workbook and I would like to use place this column letter of the cell that is referenced in a separate cell Example: In Worksheet 1 Cell A2 formula = 'Worksheet2'!D18 b2 desired value D Thanks |
Extract Column Letter from Cell Reference in another Cell
Try this UDF:
Function letter(r As Range) As String Dim rr As Range S2 = Split(r.Formula, "!") Set rr = Range(S2(1)) S3 = Split(rr.Address, "$") letter = S3(1) End Function -- Gary's Student "JKBEXCEL" wrote: Hi I have a cell with references another sheet in the same workbook and I would like to use place this column letter of the cell that is referenced in a separate cell Example: In Worksheet 1 Cell A2 formula = 'Worksheet2'!D18 b2 desired value D Thanks |
Extract Column Letter from Cell Reference in another Cell
Try this UDF:
-- Gary's Student "JKBEXCEL" wrote: Hi I have a cell with references another sheet in the same workbook and I would like to use place this column letter of the cell that is referenced in a separate cell Example: In Worksheet 1 Cell A2 formula = 'Worksheet2'!D18 b2 desired value D Thanks |
All times are GMT +1. The time now is 04:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com