TL;DR: I'm basically trying to obtain a column range such as 'Sheet 1'!$A:$A where the A is obtained by matching the contents of a given cell to a 1:1 range within a sheet referenced by another given cell, for use in a dynamic range.
In the highly probable case where that made zero sense, here's an illustration:
PARAMETERS: A2 = "LIST" | C2 = "FirstName" | Desired result: 'LIST'!$A:$A
And I've obtained that, BUT, I can't use that output ('LIST'!$A:$A) within formulas (namely to create a dynamic range). For instance, here 'LIST'!$A:$A contains 101 cells with values in them:
V3 = NamedFormula = 'LIST'!$A:$A
COUNTA(INDIRECT(V3)) = 101
COUNTA(INDIRECT(NamedFormula)) = 1 because it evaluates to #VALUE and that is a singular result.
Before delving into the topic of using INDIRECT with a Named Range (which I've read about and am still getting over my confused grief), I'm realizing my Names are getting a bit out of hand. I tend to use Excel like a mad scientist. So, in case there's a much simpler solution to what I'm trying to do, here's my actual mission:
0. I'm building a tool to simplify a process where email addresses are built from different data, which needs to run without any scripts, only formulas.
1. A tab with no imposed name would contain a user database with minimally (firstname and lastname OR IDs) AND (potentially other data columns) in no specific order. Tool users would import that tab from wherever the data got to them depending on the client, and would only need to copy-paste relevant headers to the main tab without changing anything else here for data integrity.
2. The main tab would have specific input fields where tool users would paste in the name of the imported tab as well as the labels of the columns they need (for instance, the labels in the first row of the columns containing the first name and the last name), and an input field for the domain name to use to build those email addresses.
3. A Data tab is referenced for cleaning and preparing strings for email address formats.
4. The Export tab would spew out a list of clean email addresses that can be exported to CSV.
The Data tab is just 2 columns to use with SUBSTITUTE so that for instance apostrophes are removed but accented letters are normalized (é -> e). I've used LAMBDA within Names to get there. The problem is to tie everything in - to get those Named ranges into the final formula.
The Names I'm using so far (I'd like to use fewer but testing specific parts extended beyond simple usage I fear):
ALPH ={"A";"B";"C";"D";"E";"F";"G";"H";"I";"J";"K";"L";"M";"N";"O";"P";"Q";"R";"S";"T";"U";"V";"W";"X";"Y";"Z"}
LABELS =LAMBDA(labelname,ADDRESS(2,MATCH(labelname,INDIRECT("'"&PARAMETERS!$A$2&"'!$1:$1"),0),1,1,PARAMETERS!$A$2))
RANGECOL =LAMBDA(labelname,COLUMN(INDIRECT(LABELS(labelname))))
RNCOL =LAMBDA(label,"'"&PARAMETERS!$A$2&"'!$"&INDEX(ALPH,RANGECOL(label))&":$"&INDEX(ALPH,RANGECOL(label)))
I haven't tied everything in the Data tab yet - I'm still trying to automate my main tab before pushing further and using the Data tab substitutions on top of everything. That will be the next step, not my current focus. But, for the curious and interested, on the Data tab I'm using something something I found on ablebits which works wonders =]
So, now if I use the offset range with a static LIST!A:A it works:
=IF($C$2<>"",LOWER(INDEX(OFFSET(INDIRECT(ADDRESS(2,MATCH($C$2,INDIRECT("'"&$A$2&"'!$1:$1"),0),1,1,$A$2)),0,0,COUNTA(LIST!A:A)-1,1),ROW())),"") &IF($C$3<>"","."&LOWER(INDEX(OFFSET(INDIRECT(ADDRESS(2,MATCH($C$3,INDIRECT("'"&$A$2&"'!$1:$1"),0),1,1,$A$2)),0,0,COUNTA(LIST!A:A)-1,1),ROW())),"") &"#"&$C$4
But when I try to use the dynamic RNCOL($C$3) it does not:
=IF($C$2<>"",LOWER(INDEX(OFFSET(INDIRECT(LABELS($C$2)),0,0,COUNTA(INDIRECT(RNCOL($C$2)))-1,1),ROW())),"") &IF($C$3<>"","."&LOWER(INDEX(OFFSET(INDIRECT(LABELS($C$3)),0,0,COUNTA(INDIRECT(RNCOL($C$3)))-1,1),ROW())),"") &"#"&$C$4
This just gives #REF, and evaluating shows the digression starting at INDIRECT(RNCOL($C$3)) equating to #VALUE.
I'm starting to see double here but my undying and completely normal love for Excel prevents me from going home from work as I'm way too far down the rabbit hole to let my obsession die here.
Any pointers as to how this can work?
Note - all of the names in the supplied sheet were generated by an online fake name generator, nothing in here is actual user data #GDPR
Thanks in advance! <3
Test sheet is available via Google Drive.
Your current set-up is not good for many reasons, and in my opinion would require a complete overhaul, the scope of which lies beyond a response on this website.
As to a 'quick fix' to your current issue, the reason your formula in E1 is currently returning an error is due to the fact that, as you can see via stepping through with the Evaluate Formula tool, the part
COUNTA(INDIRECT(RNCOL($C$2)))-1
is resolving to
COUNTA(INDIRECT({"'LIST'!$A:$A"}))-1
and this is not the same as
COUNTA(INDIRECT("'LIST'!$A:$A"))-1
in that the value being passed to INDIRECT is an array in the former though not in the latter. Although INDIRECT can accept arrays, it is only within certain constructions in conjunction with other suitable functions; here it will simply error.
And the reason that it is returning an array is due to the fact that RNCOL($C$2) is returning an array, and that is because that function is defined as
=LAMBDA(label,"'"&PARAMETERS!$A$2&"'!$"&INDEX(ALPH,RANGECOL(label))&":$"&INDEX(ALPH,RANGECOL(label)))
and, since RANGECOL($C$2) resolves to 1 here, the above is equivalent to
"'PARAMETERS!$A$2'!$"&INDEX(ALPH,1)&":$"&INDEX(ALPH,1)
Here, because you are omitting the column_num parameter from INDEX, the part
INDEX(ALPH,1)
is resolving to
{"A"}
which is an array (albeit one comprising a single value) and technically different from
"A"
In most circumstances, this is not an issue. As such, it is almost always unnecessary to pass both a row_num and column_num parameter to INDEX when indexing a one-dimensional array. Here, however, it matters.
You can resolve this by explicitly including a column_num parameter, i.e. redefine RNCOL as
=LAMBDA(label,"'"&PARAMETERS!$A$2&"'!$"&INDEX(ALPH,RANGECOL(label),1)&":$"&INDEX(ALPH,RANGECOL(label),1))
I am looking to be able to hold a value in a variable and use that variable throughout contentful, is this possible? Let’s say the variable is a number 12345, this number may change a month from now. If I write 12345 inside each content area like 60 times, I have to edit 60 times (not even mentioning locales). Is there a way I can create a label and put this value in that and use that label throughout my content?
in your case I would suggest creating a separate content type that holds this value. You can then refer to this value in any other content types. This way, if you have to change the value, you only do it once, and all the other content types have the new value.
I tried an example in api.ai, with reference to the Beginner's Guide, I am attaching error response as a screen-shot. I was expecting to get the values of marked intents.
The problem is that, somehow, you have "tomorrow" associated with a city entity in the first example phrase (the purple color matches the #sys:geo-city-gb entity). Because of this, it is looking for a phrase "Can I know available slots for somewhere" where the somewhere should be a city name. But "tomorrow" is not the name of a city, so it doesn't include that.
Since neither parameter is required, but it has a pretty close match, it is able to match the intent - but none of the parameters fit, so they're all left empty.
You should be able to delete this and re-type "tomorrow" to change it back to a #sys.date entity. Or add additional phrases which match it against a date.
I am attempting to make a budget calculator and want to import my CC data to compare my actual spending w/estimated spending based on different categories. Briefly, (see attached screen shot), I have the input from my credit card which has location specific data, I have another column with a refined transaction type, and a third and final column with the associated spending category.
I can not figure out how to use the raw transaction data to search for the refined transaction type and associated spending category.
=VLOOKUP(FIND(C2&"*",Sheet3!A:A,1),A1:B10,2,TRUE)
Problem Example
First of all, the FIND function returns a number, which then becomes a parameter for VLOOKUP. This won't get you the results you're expecting. It'll search for a number.
This is going to be complex but here's a start, for EXACTLY the data you've provided.
=VLOOKUP(LEFT(C2,FIND("#",SUBSTITUTE(C2," ","#",(LEN(C2)-LEN(SUBSTITUTE(C2," ","")))/LEN(" ")))-1),A:B,2,0)
Drop that into cell D2. Have fun.
I apologize in advance if this is unclear, I will try to explain everything as best I can! I am working with a data set in Google Sheets such that Column A is a list of student IDs and Column B is a list of student behaviors. It looks something like this:
A(ID) B(Behaviors)
12345 Talking
54321 Out of Seat
98765 Lying
12345 Talking
12345 Lying
98765 Lying
The list is data set is quite large because it contains recorded data from the entire school population over the course of the year, and as you can see the entire student population is pooled in one list. I am looking for a way to find each students (identified by their IDs) most commonly assigned behavior. For example, for the above data, student 12345 would have 'Talking' listed as their most common behavior and student 98765 would have 'Lying' listed as their most common behavior.
Ideally, I want to create a separate spreadsheet that looks something like this:
A(ID) B(Most Common Behavior)
12345 Talking
98765 Lying
54321 Out of Seat
Such that column A is a list of all the student's IDs and column B lists their most common behavior.
I found that I could use this formula:
=INDEX(Behaviors,MODE(MATCH(Behaviors,Behaviors,0)))
To pull out the most common value from the column containing scholar behaviors, but this formula gives me the most common behavior among the entire student population, so I am interested in modifying it so that the formula first looks at the student ID and then looks at the most common behavior within that sublist.
Please let me know if you require any further information. Thanks in advance for your help!
Are you familiar using PivotTables? You could just create a PivotTable with ID as a Row Label and Behavior as a column label and Value. Then it would just be a matter of copying/pasting those values and using a MAX formula to get the greatest behavior count.