Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I thought this would be easy to find via search, but no dice. I have a straight table/chart that uses column() references in its expressions -- e.g. Cost * column(1). I want to refer to columns not by number but by name (label). Further, many of my column names use expressions. So I might have a column label set to...
="Usage" & chr(10) & vMonth
Part of the problem is users clicking and dragging column headers around to reorder the columns (sometimes inadvertently). This throws off some of the calculations. Rewriting the expressions to not use column references isn't really an option.
Is there a way? Thanks.
Hi,
Try this in your expression :
$(='['&"Usage" & chr(10) & vMonth&']')
The changing nature (because you use expressions for column label it seems) of the column label might make it difficult, if not impossible, to refer the label names in your expression. May be use the actual expressions or put the expression in a variable and use variable to do what you are doing with the expression labels.
Try
="$(='Usage' & chr(10) & vMonth)"
One solution is to block the columns rearranging:
Straigt Table -> Presentation -> Allow Drag and Drop
Pivot -> Presentation -> Allow Pivoting
But usually I write expressions without referencing other columns.
Hi,
Try this in your expression :
$(='['&"Usage" & chr(10) & vMonth&']')
Excellent. Thank you.