Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Steve" wrote in message
I guess I'm not entirely understanding the removal of the workbook file names. It does not appear in the final equation. Only in the "intermediary" name. Would it not still view the intermediary and final equations the same? As discussed, the Address function with External:=True returns the fully qualified address with sheet and file names. In a cell formula qualification to sheet is only required where necessary to refer to a different sheet, and similarly qualification to the file name if the reference is in another workbook. An unnecessary qualification to the file-name entered into a formula will get discarded. Looking back at the code you posted you also gave these details MyRng address is ShtNm!$F$5:$F$100 MyRngA address is $C$10:$C45 MyRng2 address is $G$10:$G10 MyRng3 address is $F10 If all the above ranges, except MyRng, are on the same sheet as the eventual formula cell you don't need to use the External:=True argument in the respective Address factions at all. If MyRng is on another sheet in the same wb it will need the qualification to the sheet, but not the file-name. Another way to get the address qualified to the sheet-name (but not file name) is like this sRef = "'" & MyRng.Parent.Name & "'!" & MyRng.Address The embracing apostrophes are sometimes required depending on certain characters in the sheet-name, eg a space, but will get discarded in the formula if not required. If you've got lots of ref's to the same sheet, simplify your VBA code with something like this sSht = "'" & MyRng.Parent.Name & "'!" sMyRng = sSht & MyRng.Address If you don't need the Absolute references you can avoid returning the $ to reduce the formula a little like this - MyRng.Address(0, 0) If you can get the formula below 255 without resorting to the workaround it'll mean it can subsequently be edited manually. Onto the crux..... So, if I'm understanding this correctly, I take my VBA equation, truncate it at anything less than what WOULD become the 255 character limit, and insert, instead, a trigger element, to have more code replace it. For the moment, I have each part split almost in half, so each part would not exceed the 200 character mark, without the file already being incredibly overwhelming/long name, long sheet names. I'm working it, but it's still vague to me... Again, thank you for your assistance/help. Not quite sure what you mean here and the "trigger element". Regards, Peter T |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"PasteSpecial method of Range class failed" when range Number of Rows 2000 | Excel Programming | |||
IS 'RANGE WINDOW CLASS' AVAILABLE ? | Excel Programming | |||
IS 'RANGE WINDOW CLASS' AVAILABLE ? | Excel Programming | |||
range class problem | Excel Programming | |||
Range Class falure | Excel Programming |