I have a spreadsheet of over 1,000 contacts where the contact names are in one column, "First Name Last Name". Is there a way I can create a new column with just the last names so that I have a column for "First Name" and for "Last Name"?
try:
=INDEX(SPLIT(A2:A; " "))
Related
I am looking to query specific columns of an imported dataset from a separate google sheet. Ideally, I would like to query all columns after the "product ID" column (refer to "Test Data Set"). The reason why I am doing this is that I need the product ID column to remain in a particular position in the "Final Destination Sheet" since the "Product ID"s will be used as a reference range for the index and match formulas on another tab of that sheet.
The formula I have so far to import and query the original dataset for the "Product ID" column is as so:
=QUERY({IMPORTRANGE("1aPpdSy5venMl97ayn7VwaOo_AcAtcoc6_l4a1loPhNI","Sheet1!A:D")}, "SELECT Col" &MATCH("Product ID", IMPORTRANGE("1aPpdSy5venMl97ayn7VwaOo_AcAtcoc6_l4a1loPhNI","Sheet1!A1:1"),0),1)
However, I am unsure how to make the formula understand to query up all the columns after the "Product ID" column. Do note, the test data set only has 4 columns and a set number of columns but the real data set I am working with will be dynamic so more columns can be added or deleted over time. (So I won't know what the finite column letter will be and if columns are deleted from the left of B then it might shift its position which is why I used the match function in my original formula to ID that specific column's location on the spreadsheet).
Thank you in advance!
Final Destination Sheet (where the data is imported to and where I am trying to query the original data for specific columns): link
Test Data Set (where the data is imported from): link
if you know the headers you can do:
=TRANSPOSE(QUERY(TRANSPOSE(IMPORTRANGE("1aPpdSy5venMl97ayn7VwaOo_AcAtcoc6_l4a1loPhNI",
"Sheet1!A:D")), "where lower(Col1) matches 'product id|size'", 0))
update:
=IMPORTRANGE("1aPpdSy5venMl97ayn7VwaOo_AcAtcoc6_l4a1loPhNI",
"Sheet1!"&ADDRESS(1, MATCH("Product ID",
IMPORTRANGE("1aPpdSy5venMl97ayn7VwaOo_AcAtcoc6_l4a1loPhNI",
"Sheet1!1:1"), 0))&":1000")
assuming headers are in row 1 this will look for a column called product id and import it and all the columns to the right of it
Working on a spreadsheet to list inventory items for sale in bulk. Wanting it to automatically generate a "Condition Note" for each item based on it's SKU and Category.
Have a sheet named "Description Table" that has Condition Notes arranged by Category (row) and Condition (column.) The last 2 digits of the item's SKU determine its condition.
This is the formula I have so far, but it's giving an error that it's not finding the row in the MATCH evaluation, specifically "Did not find value '43' in MATCH evaluation." 43 is located in A6 of the Description Table sheet. Any ideas?
=INDEX('Description Table'!A1:J23,MATCH(RIGHT(C2,2),'Description Table'!A:A,0),MATCH(B2,'Description Table'!1:1,0))
Here's the spreadsheet: https://docs.google.com/spreadsheets/d/1SBtJicsKlxykBfKwwLyeHV__ope-D1lciA8X2FD3CKo/edit?usp=sharing
You can't match the string "43" with the number 43. You need to convert the string to a number:
=INDEX('Description Table'!A1:J23,MATCH(value(RIGHT(C2,2)),'Description Table'!A:A,0),MATCH(B2,'Description Table'!1:1,0))
use:
=ARRAYFORMULA(IFNA(VLOOKUP(RIGHT(C2:C, 2)*1, 'Description Table'!A3:K,
MATCH(B2:B, 'Description Table'!A1:K1, 0), 0)))
I have a pivot table in google sheets. My data consists of rows where columns are "carton number", "product", "pallet number" (other, non-important, columns are omitted).
I want to generate a pivot table such that I get a summary of "what is on each pallet". Basically I've put into rows the "pallet number" and "product" and then into values "carton number". The value "carton number" is shown as "COUNT".
Of course, the problem is that this pivot table doesn't show the actual "carton number", it just shows "1" per each row, but the summary row of product/pallet shows the correct carton quantity.
Hence I had to put "carton number" also into "rows". Example sheet here:
https://docs.google.com/spreadsheets/d/1xpWYeG2aJCoqmnM53ubWUroKKJT5Zy-BiipauoXUHGw/edit#gid=799560604
What I want is to have a pivot table where, in the example above, there is only 1 value of "C. N." (carton number) - showing actual carton number; and the summary row at product/pallet level shows "COUNT" of the boxes, ie. how many boxes of product are on a specific pallet.
How can I achieve this?
paste in E1 cell and hide C:D columns:
=ARRAYFORMULA({"C.N."; IF(C2:C<>"", C2:C, D2:D)})
I was curious if there was a way in SQLPLUS to run the column format option as well as the select query in one line? instead of having to run each format column line individually. for example:
((column "Role" heading "Role" Format a30,
column "User ID" heading "User ID" Format a5,
column "Password" heading "Password" format a8,
column "Group" heading "Group" format a50,
column "User Name" heading "User Name" Format a15),
(Select ...);
Thanks for any input!
The COLUMN ... FORMAT command keeps config for a given column until either you exit from SQL*Plus or provide a new format. So NO, it does not apply to a single query and it cannot go inside a single query.
(Oracle reference)
I've been looking for hours but no luck. Please have a look at my below question. Thank you!
I'd like to find row values in one column (let's say "product keyword") that are texts like this: apple, banana... in all rows of a column in another sheet (let's call the column "product name"). These rows contain values like apple-ringer-1, banana-crowd-2... When the first row in "product name" column that contains product keyword is found, then it returns that product name value.
I've tried to use QUERY function but it seemingly does not search the product keyword in ALL rows in the product name column.
enter image description here
Thanks all.
You could use wildcards in VLOOKUP.
Assuming values to find are in A1:A2
=ARRAYFORMULA(VLOOKUP("*"&A1:A2& "*",Sheet2!A1:A,1,0))