Add suffix to a decimal row (to show litres) - ios

I'm using Eureka Forms for swift 2 and I'm trying to add a Suffix to a DecimalRow. My the reason is that in this row the user will enter the amount of litre consumed, so I would like the row to display the L at the end all the time
I did not find anything in the API docs to help me with this....
Thanks

Related

How to remove a piece of text from a cell?

I'm trying to remove a piece of text (Perfomance) from a column in Google Spreadsheet that contains (XX Performance) XX is a number like 89. I'm using:
=REGEXREPLACE(D:D, " Performance "," - ")
But no love...
enter image description here
Try this Example Sheet
=ArrayFormula(IF(D2:D="",, REGEXEXTRACT(D2:D, "[0-9]+")))
You can use the expression \D+:
\D matches any character that's not a digit (equivalent to [^0-9])
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed
The formula will be like:
=REGEXREPLACE(D:D, "\D+","")
UPDATE
I did put it in another column otherwise it creates a circular dependency. The data is imported via API from another app.
Then you will need to create another sheet or use a hidden column to put that information and then use the regex on the column you want the final result.

Web Scraping Google-Sheets ImportXML - xpath - specific Number in URL

I am trying to get a specific Number from an URL, which is hyperlinked on the website.
Please see here a copy of my spreadsheet.
In Row "I" - i did a code, so it will directly go the the search of the eBay website, and combines the EAN number ="https://www.ebay.de/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw="&""&D2
this is the outcome:
https://www.ebay.de/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=8713439712292
Till here it works.
On the page, i want the ebay Kategorie ID for that articel, which can be found as a Hyperlink on the Categories [See Image of eBay Categorie here] Navigation on the left.
In the URl it is always the first Number, eg. https://www.ebay.de/sch/**158817**/i.html?_from=R40&_nkw=650135421227
InspectCode URL I need
All I want know, is to put the Number 158817 in my google spreadsheet.
With this code
=IMPORTXML(I2;"//*[#id='x-refine__group__0']/ul/li/ul/li/ul")
I only get the categorie name, but I need the number to make my CSV upload work.
What code do I need? Can Someone please guide me?
thank you
Lisa
With A1 = https://www.ebay.de/sch/**158817**/i.html?_from=R40&_nkw=650135421227, try this
=regexextract(IMPORTXML(A1;"//*[#id='x-refine__group__0']/ul/li/ul/li/ul/li/a/#href");"[0-9]+")
assuming that the url is always at the same position in the nomenclature
or, to get all numbers
=arrayformula(regexextract(IMPORTXML(A1;"//*[#id='x-refine__group__0']/ul/li//a/#href");"[0-9]+"))

Google Sheets - How to concatenate a range based on a matching value in another cell?

I have a sheet that lists through filenames of an image gallery. Each row represents a new image; has a unique filename, but has an associated non-unique page title, as follows:
title
filename
Page 1
img1.jpg
Page 1
img2.jpg
Page 1
img3.jpg
Page 2
img4.jpg
Page 2
img5.jpg
Page 2
img6.jpg
What I need to do is concatenate each file name into a single cell, (formatted in a particular way), as follows:
title
filename
Page 1
img1.jpg///img2.jpg///img3.jpg///
Page 2
img4.jpg///img5.jpg///img6.jpg///
I have tried everything I can think of using COUNTIF, UNIQUE but I can't seem to get anywhere.
I would just write a basic formula for if A1 = "Page 1"... but I have thousands of rows to do so it would take me days and days to write them all out manually changing the formula.
Oh wise wizards of Stackoverflow, please work your wizened magic and help me out with a formula? I have no idea how to use VBA but am willing to poke around if necessary.
Many many thank-yous!
Assuming the datarange in A2:B, try
=arrayformula({unique(A2:A), trim(transpose(query(if((transpose(unique(A2:A))=A2:A)*len(A2:A), B2:B&"///",),,50000)))})
Change range to suit and see if that works?
If you don't want to have any spaces in the output, try
=arrayformula({unique(A2:A), substitute(trim(transpose(query(if((transpose(unique(A2:A))=A2:A)*len(A2:A), B2:B&"///",),,50000)))," ",)})

How to import information from sheets in another Document based on two values? Google Sheets

I have 2 documents:
Document 1 contains a list with so called Set-names, displayed as "Set". And within each "Set" there is name that can be found that corresponds to the number within that set.
Document 2 contains all the Set-names with each their own numbers and Name. Each Set-name has it's own Sheet, and there is a lot of them.
I want to fill in just the Set-name "Set" and Set-number "Set#", to automatically display the name corresponding to these two values. The question is however, how do I do that?
Document 1: Collection
Shared document link: Click here (File > Make copy)
Document 2: All Set-names
Shared document link: Click here (File > Make copy)
In this example above I would like to output "Dark Raichu" within Document 1 at Q74:T74 and at Q75:T75. Is this even possible to make? INDIRECT might help as well so I don't have to manually edit each Set-name. Any idea/suggestion/solution is much appreciated!
EDIT
(following OP's explanations)
First of all I have to say that you should AVOID making such radical changes to the original question, since it completely throws readers off balance.
Having said that there is a completely different approach that should be followed.
In your Document 2: All Set-names
Step 1
Go to your Wizards Black Star Promos tab.
Using a formula like =ArrayFormula(A4:A59&"/555")
change the Set # from 1,2,3...59 to 1/555,2/555,3/555...59/555
(555 can be any unique number that does NOT conflict with the other sets)
Step 2
Create a new tab. Name this tab AllSets
Step 3
Use this formula in cell A2
={FILTER('Base Set'!A5:C,'Base Set'!A5:A<>"");
FILTER(Fossil!A5:C,Fossil!A5:A<>"");
FILTER('Base Set 2'!A5:C,'Base Set 2'!A5:A<>"");
FILTER('Wizards Black Star Promos'!A5:C,'Wizards Black Star Promos'!A5:A<>"");
FILTER(Jungle!A5:C,Jungle!A5:A<>"")}
Using this pattern complete the formula for the rest of your tabs. You will end up with a 3 columns list of all your sets in one place.
In your Document 1: Collection
Step 4
Go to your Collection tab.
In cell Q2 (where column Q is exactly before your Name column R) use the following formula.
(As before, complete the formula for the rest of your tabs)
=INDEX(IFERROR(N2:N&(SWITCH(H2:H,
"Base Set","/96",
"Jungle","/64",
"Wizards Black Star Promos","/555",
"Fossil","/62"))))
This way you will bring the complete Set # back.
This will be our helper column which can be hidden and will be only used in the next formula.
Step 5
In the same Collection tab and in cell R2 place this formula
=ArrayFormula(IFERROR(
VLOOKUP(Q2:Q,IMPORTRANGE("1n8iWAl7ZQhsue6Opefvh_9yDwMk06PvqUdQoVuEJw00","AllSets!A2:C"),{2,3},0)))
The above final formula will give you everything.
The Card name, the Type as well as the Link and the Image of the card.
If you do not want the Type just change this part of the formula {2,3} to just 2.
Step 6
Enjoy :)
Additional functions used:
FILTER
INDEX
SWITCH
Original answer
(For the question as originally posted )
You can use a combination formula like
=ArrayFormula(IFERROR(
VLOOKUP(V2:V,{REGEXEXTRACT(Sheet1!R2:R,"\d+")*1,Sheet1!S2:S},2,0)))
(do adjust ranges and locale syntax to meet your needs)
Functions used:
ArrayFormula
IFERROR
VLOOKUP
REGEXEXTRACT
You can easily import a range from one Spreadsheet to another using IMPORTRANGE. IN your case described as you wanted to import the range A5:A (i.e all cells in column A minus the first 5 cells in the column) of the sheet Team Rocket of the Spreadsheet Document 2 into Document 1 cell Q73 you would need to use this function in cell Q73:
=IMPORTRANGE("YOUR DOCUMENT 2 SPREADSHEET URL","Team Rocket!A5:A")
Note that when you first use this function it might ask you to grant access between these Spreadsheeets to let one get the data from the other

How to assign a unique ID to a google form input?

Google Forms - I have set up a google form and I want to assign a unique id each of the completed incoming form inputs. My intention is to use the unique ID as an input for another google form I have created which I will use to link the two completed forms. Is there another easier way to do this?
I'm not a programmer but I have programming resources available to me if needed.
I was also banging my head at this and finally found a solution.
I compose a 6-digit number that gets generated automatically for every row and is composed of:
3 digits of the row number - that gives the uniqueness (you can use more if you expect more than 998 responses), concatenated with
3 digits of the timestamp converted to a number - that prevents guessing the number
Follow these instructions:
Create an additional column in the spreadsheet linked to your form, let's call it: "unique ID"
Row number 1 should be populated with column titles automatically
In row number 2, under column "Unique ID", add the following formula:
=arrayformula( if( len(A2:A), "" & text(row(A2:A) - row(A2) + 2, "000") & RIGHT(VALUE(A2:A), 3), iferror(1/0) ) )
Note: An array formula applies automatically to the entire column.
Make sure you never delete that row, even if you clear up all the results from the form
Once a new submission is populated, its "Unique ID" will appear automatically
Formula explanation:
Column A should normally hold the timestamp. If the timestamp is not empty, then this gives the row number: row(A2:A) - row(A2) + 2
Using text I trim it to a 3-digit number.
Then I concatenate it with the timestamp converted to a number using VALUE and trim it to the three right-most digits using RIGHT
Voila! A number that is both unique and hard-to-guess (as the submitter has no access to the timestamp).
If you would like more confidence, obviously you could use more digits for each of the parts.
You can apply unique ID numbers using an arrayformula next to the form data. In row 1 of the first rightmost empty column you can use something like
=arrayformula(if(row(A1:A)=1,"UNIQUE ID",if(len(A1:A)>0,98+row(A1:A),iferror(1/0))).
A few comments regarding the explanation provided by #Ying, which I will try to expand, as it is very good.
> Column A should normally hold the timestamp.
In my case, it is date+time stamp.
> 4. Make sure you never delete that row,
even if you clear up all the results from the form
That issue can easily be avoided by placing the formula in the header like this
={"calculated_id";arrayformula( if( len(C2:C); "" & text(row(C2:C) - row(C2) + 2; "000") & RIGHT(VALUE(C2:C); 3); iferror(1/0) ) )}
This formula provides an string for one cell, and a formula for the next one, which happens to be an array formula which will cover all the cells below.
Note: Depending on your language settings you may need to use ";" or "," as separator among parameters.
> 5. Once a new submission is populated,
its "Unique ID" will appear automatically
Issue
And here is the issue I see with this solution.
If the Google Form allows responders to Edit their responses, the date+time stamp will change and so the calculated_id.
A workaround is to have 2 columns, one is the calculated_id and the other will be static_id.
static_id will take whatever is on calculated_id only if itself has no data, otherwise it will stay as it is.
Doing that we will have an ID that will not change no matter how many updates the response experience.
The sort formula for static_id is
=IF(AND(IFERROR(K2)<>0;K2<>"");K2;L2)
The large one is
={"static_id";ArrayFormula(IF(AND(IFERROR(M2:M)<>0;M2:M<>"");M2:M;L2:L))
}
M or K -> static_id
L -> calculated_id
Remember to put this last one on the header of the column. I tend to change the color to purple when it has a formula behind, so I don't mess with it by mistake.
Extra info.
The numeric value from the date/time stamp differs when it comes from both or just one. Here are some examples.
Note that the number of digits on the fractional part differ quite a lot depending on the case.

Resources