How to combine and split cells in tabulator.js - tabulator

I need to create a complex tabular structure. The table is built using the tabulator.js library. But I can not find in the documentation how to combine or split the cells.
I want to create something like this:
|---------------------------------------------|
| TITLE | TERM START | TERM END |
|---------------------------------------------|
| | term_1_start | term_1_end |
| year_1 |-------------------------------|
| | term_2_start | term_2_end |
|---------------------------------------------|
| year_2 | not avalibe |
|---------------------------------------------|
Or there may be some other library that can easily handle it.

Would column groups work for you?:
http://tabulator.info/examples/4.3#column-groups

Currently not feasible because Tabulator.js uses DIVs to create HTML elements.
Unfortunately div has not colspan/rowspan attribute.
If you see the Developer Roadmap you can check the Version 5.0 which contain that the following description:
Coll Span Functionality
Row Span Functionality

Related

Excel Consolidate Data not working - Data does not merge

For some reason I cannot get the Excel consolidation function to work. My data refuses to merge.
All of the numbers in my column are formatted as dollar amounts.
My original data set looks like this:
__________________
|NAME |DOLLARS |
|Andrew | $10.00|
|Michael | $10.00|
|Emma | $10.00|
|Andrew | $10.00|
|Michael | $10.00|
|Emma | $10.00|
-------------------
But after I run it through the Consolidate Data function, where I made sure to select all of the data + the headers, and selected "sum", my results look like this:
__________________
|NAME |DOLLARS |
| | $10.00|
| | $10.00|
| | $10.00|
| | $10.00|
| | $10.00|
| | $10.00|
-------------------
I have no idea why it's not working. I tried following several tutorials to the letter, as well as scouring the internet for solutions, but everything I tried did not work.
That's because you can't consolidate letters by 'summing' them. So it leaves them blank as this would error.
You have to specify that the first column isn't to be summed, but rather to be used as row labels. This is done by ticking
Use labels in > Left column
You have already selected Top row. it is the option underneath:
This does result in no column name for the first column, but you could easily type that back in afterwards in the destination range.
But I have a feeling you might not actually want to use the consolidate tool. This is for consolidating multiple ranges of data into one. Your dataset only includes one range of values so would be pointless consolidating it.
More on consolidating can be ready here: https://support.microsoft.com/en-us/office/consolidate-data-in-multiple-worksheets-007ce8f4-2fae-4fea-9ee5-a0b2c9e36d9b

Excel - Forumla to seacrh for mutliple terms and show the matching term

I have the challenge that I need to search in Excel for multiple terms and to get the result back for each cell which of the different terms has matched.
I know there is a formula combination to search for multiple terms but this will not give me the matched term back. The exampel below gives only a "0" or "1" back.
=IF(ISNUMBER(SEARCH({"TermA","TermB","TermC"},A1)),"1","0")
| | A | B |
| 1 | This is TermA | TermA |
| 2 | Some TermB Text | TermB |
| 3 | And TermA Text | TermA |
| 4 | another TermC | TermC |
Background I have to do some normalization of the values and look therefore for some forumla which can identify the values and list the match. The values which are used to search for should be later on another page so it can be easily extended.
Thank you for some hints and approaches which will put me into the right direction.
To return all matching terms:
=INDEX(FILTERXML("<t><s>"&SUBSTITUTE(A1," ","</s><s>")&"</s></t>","//s[.='TermA' or .='TermB' or .='TermC']"),COLUMN(A1))
Wrap in an IFERROR() if no match is found at all.
If one has ExcelO365 and you refer to a range, things got a lot easier:
Formula in E1:
=TRANSPOSE(FILTER(C$1:C$3,ISNUMBER(FIND(C$1:C$3,A1))))
=INDEX(FILTER(C:C,C:C<>""),MATCH(1, COUNTIF(A1, "*"&FILTER(C:C,C:C<>"")&"*"), 0))
For use in office 365 version. If previous version replace FILTER(C:C,C:C<>"") with C$1:C$4 for your example or whatever your range of search values may be. Table reference is also possible.
The formula searches for the first match in your list of values if the text including your term contains a matching value anywhere in that text. It returns the first match.

Building dependent picklist by finding associated rows

I have a need for a dependent picklists. The outputted workbook is actually created programmatically which does restrict the way this needs to be built (I'm trying to create everything in Excel first and then finish the programmatic output of the sheet).
I have rows that need dropdowns representing Objects and Fields in a database. So dropdown1 would contain a list of Objects and dropdown2 depends on that to display a list of Fields based on that object.
I have a Ledger sheet containing the data that needs to be represented. Something like this:
| A | B | C |
|--------|--------|---------------|
| People | People | First Name |
| Places | People | Last Name |
| Things | People | Phone Number |
| | People | Email Address |
| | Places | Longitude |
| | Places | Latitude |
| | Things | Color |
| | Things | Shape |
The A column contains all the Objects (People, Places, Things) and is used to populate all the dropdown1's. The B & C columns are used to represent the fields - B being the Object the field belongs to and C being the FieldName. So if I choose People in dropdown1 I want dropdown 2 to contain only values from C that apply to People (First Name, Last Name, Phone Number, Email Address)
I'm struggling to make this work. In another sheet I have succeeded in listing out the values that I would want in dropdown2 using the following formula (where A2 refers to dropdown1) - =IFERROR(INDEX(Ledger!C2:C1000,SMALL(IF(A2=Ledger!B2:B1000, ROW(Ledger!C2:C1000)-1,""), ROW()-1)), "") - but I haven't been able to actually make this work when creating a dropdown (via Data Validation button in excel). How can I get this into a dropdown in excel?

How can I write an Excel formula that will match two columns of data against another table, and only return true if both columns match?

I want to be able to tell if a row in my working table matches another table. Specifically, I only want to know if both values from two columns match.
For example, if james#abc.com has a source of leadgen in both tables, that's a match. Here are some example tables to illustrate that.
My working table
| Email | Source |
|---------------|---------|
| james#abc.com | leadgen | Matched!
| mike#abc.com | leadgen | No Match
| billy#abc.com | leadgen | No Match
| amy#abc.com | leadgen | No Match
Table I want to match against
| Email | Source |
|---------------|---------|
| james#abc.com | leadgen |
| mike#abc.com | popup |
| amy#abc.com | banner |
Here is the formula I tried using.
IF(AND(
MATCH([Email],'secondTable[Email],0),
MATCH([Source],'secondTable[Source],0)),
"Matched!","No Match"
Unfortunately, this returns a match for mike#abc.com because even though his source is popup in the second table, the source value leadgen appears elsewhere. At least that's what I'm interpreting here.
You can simply use COUNTIFS:
=IF(COUNTIFS(secondTable[Source],[Source], secondTable[Email], [Email]),"Matched!","No Match")
=IF(ISNUMERIC(MATCH([Email]&[Source],secondTable[Email]&secondTable[Source],0)),"Matched!","No Match")
Confirm with Ctrl-Shift-Enter instead of Enter when leaving edit mode.

Specific concatenation of text cells by formula

I'm having difficulty producing a CONCATENATE formula that combines text cells in the way that I want. There are five fields that I want to concatenate: Title, Forename, RegnalNumber, Surname, and Alias, in that order. I'm no regex expert, so excuse the poor formatting, but this is a rough way of expressing what I'm trying to achieve:
(title)? (forename) (regnalnumber)? (surname)?, (alias).
The only field that can't be null is the forename field, although it might have the value "?", in which case it shouldn't output anything in the concatenation, i.e. it should be treated as blank. Hopefully the following test cases should demonstrate the output I'm trying to achieve: the output on the right is what it should look like:
| Title | Forename | RN | Surname | Alias | CONCATENATE |
+--------+----------+----+-----------+--------------+---------------------------------------+
| Ser | Jaime | | Lannister | Kingslayer | Ser Jaime Lannister, Kingslayer |
| | Pate | | | | Pate |
| Lord | ? | | Vance | | Lord Vance |
| King | Aerys | II | Targaryen | The Mad King | King Aerys II Targaryen, The Mad King |
| Lord | Jon | | Arryn | | Lord Jon Arryn |
| | Garth | | | Of Oldtown | Garth, Of Oldtown |
I've experimented for ages trying to make this concatenation work, but haven't been able to get it right. This is the current formula, with cell references replaced by the field name for comprehensibility:
=CONCATENATE(IF(Title<>"",Title&" ",""),IF(AND(Forename<>"",Forename<>"?"),Forename,""),IF(RN<>""," "&RN,""), IF(OR(AND(Forename<>"", Forename<>"?"), Surname<>"", RN<>""), " ",""), IF(Surname<>"",Surname,""),IF(AND(Alias<>"",OR(Alias<>"",AND(Forename<>"", Forename<>"?"),Surname<>"")),", "&Alias, Alias))
There is one case where it doesn't work: if the Surname and RN are null but the the Forename and Alias are non-null. For example, if the Forename is Garth, and the Alias is Of Oldtown, the concatenation outputs: Garth , Of Oldtown. It's the same if the title is non-null. It shouldn't have a space before the comma.
Can you help me to fix this formula so it works as expected? If you can find a way to simplify it, even better! I know I'm probably overcomplicating this a great deal. I'm using LibreOffice Calc 4.3.1.2, not Excel.
The best way imho to solve situations like this is to divide the problem over multiple simple columns, rather than 1 huge complex formula. Remember you can always hide the columns that you don't want to see.
So create a column for Title that says =if(a2="","",a2&" ").
That can be extended for all the other columns, except:
for Forename, where you want to include the "?" as follows: =if(b2="?","",b2&" ")
for Alias, where you want to include the leading ",": =if(e2="","",", "&e2)
Lastly just concatenate each of your working columns with something like: =f2&g2&h2&i2&j2.
This breaks the problem down into very simple components, and makes it easy to debug. If you want to add extra functionality at a later stage, it is easy to swap out one of your formulae for something else.
I know this is only a bit of fun, but can I suggest a more algorithmic approach?
The algorithm is:-
If a field is empty or ?, do nothing
Else
If concatenation so far is empty, add field to concatenation
Else
Add a space followed by the field to concatenation
which leads to this formula in G2 :-
=IF(OR(A2="",A2="?"),F2,IF(F2="",A2,F2&" "&A2)
(need to put single apostrophes in column F to make it work)
which when copied across looks like this:-

Resources