Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-15-2025, 03:26 AM
chrisjj chrisjj is offline Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Windows 7 64bit Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Office 97-2003
Competent Performer
Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references?
 
Join Date: Aug 2025
Posts: 120
chrisjj is on a distinguished road
Default Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references?

I often upgrade the readability of formulas by naming a column (technically as a range) and replacing e.g. =D2 by =Status relying on Excel interpreting the range name as a reference to the current row in that range. (Sad though that formula editing's source highlighting doesn't do the same, instead showing highlighting range rather than cell.)



However, replacing =myfunc(D2) by =myfunc(Status) can (depending on myfunc definition) fail with a VALUE error. It seems the interpretation is AWOL.

My workaround is: =myfunc(INDEX(Status,ROW())) . This defeats much of the readability upgrade.

Do you know a workaround that's more readable?

The best I've come up with is a user function - here(<name>) - which is a lot more elaborate in definition and a lot slower in execution.
Reply With Quote
  #2  
Old 09-15-2025, 08:01 AM
ArviLaanemets ArviLaanemets is offline Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Windows 8 Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Office 2016
Expert
 
Join Date: May 2017
Posts: 949
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Instead regular table, use Defined Table (Insert>Table)

Then, in case the formula will be in same table, you can refer to cell in same row, like
=[@Status] (where Status is the example name for header of referred column)
In case the formula will not be in same table, you can refer to cell of any Defined Table in same row as the current row for your formula, like
=tTest[@Status]
where tTest is the example of name of Defined Table

You also can refer to whole column of Defined Table, like
=COUNTA(tTest[Status])
Or to column header of Defined Table, like
=tTest[[#Headers];[Status]]
etc.
Reply With Quote
  #3  
Old 09-15-2025, 10:23 AM
chrisjj chrisjj is offline Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Windows 7 64bit Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Office 97-2003
Competent Performer
Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references?
 
Join Date: Aug 2025
Posts: 120
chrisjj is on a distinguished road
Default

Quote:
Originally Posted by ArviLaanemets View Post
Instead regular table, use Defined Table (Insert>Table)
Excel 2003, so I tried Data > List.

Quote:
Originally Posted by ArviLaanemets View Post
Then, in case the formula will be in same table, you can refer to cell in same row, like
=[@Status] (where Status is the example name for header of referred column)
I get this fail:

Reply With Quote
  #4  
Old 09-15-2025, 11:23 AM
ArviLaanemets ArviLaanemets is offline Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Windows 8 Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Office 2016
Expert
 
Join Date: May 2017
Posts: 949
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Sorry! Defined Tables are available starting from Excel 2007!

A possible workaround for older versions:
Add to table a column where the row number of table's datarange is calculated, like
=ROW() - HeaderRowNumber
(In case the start row if datarange is always fixed, you can skip this part, and simply calculate the datarange row number whenever it is needed);
Define dataranges of table columns you need to refer to in your formulas as dynamic names. Like the datarange where row numbers mentioned above are calculated. P.e. the row numbers are calculated in column F, and the header row of table is 1, then the formula for named range nRow will be something like
Code:
=OFFSET($F$1,1,,MAX($F:$F),1)
;
To get a value from cell in current row of datarange defined e.g. as nTest in same table, use formula (e.g. in row 2 of your worksheet) like
Code:
=INDEX(nTest,$F2)
Reply With Quote
  #5  
Old 09-15-2025, 11:37 AM
chrisjj chrisjj is offline Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Windows 7 64bit Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Office 97-2003
Competent Performer
Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references?
 
Join Date: Aug 2025
Posts: 120
chrisjj is on a distinguished road
Default

I'm not sure $F2 is more readable than ROW(), but thanks very much since I think you've demonstrated no improvement is possible beyond the here() function.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to see names in merge since upgrading to Word 2016 thelighthouse Mail Merge 2 06-21-2017 06:55 AM
Convert cell with formula to literal value JoyLearner Excel 5 05-31-2017 09:30 AM
Do I stand to gain productivity overall by upgrading to Word 2007/2010 from 2003? New Daddy Word 3 11-27-2012 03:24 PM
Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? documents lost upgrading from words2000 to words 2003 reuven1925 Office 1 09-01-2011 05:28 AM
Excel 2003 formulas - Is there a more-readable way to use names in place of literal cell references? Another general question upgrading from Office 2003 to 2010 Ckingfly Office 2 01-09-2011 03:27 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft