I have a Spreadsheet with multiple sheets.
In one of them I'm trying to populate a column combining the value of two columns from another sheet.
Something like: Col1: City, Col2: Country -> In new Sheet, Location = (Col2), (Col1).
I've tried this but so far no luck:
=INDIRECT("FormaData!P2:P"&"FormData!O2:O")
FormData is the name of the external sheet, and the columns that I'm trying to automatically populate from are:
P2 to end of P (city) and O2 to end of O (country).
Any help will be highly appreciated!
This should work all the way down
=arrayformula('FormaData'!P2:P&", "&'FormaData'!O2:O)
Are you using a different spreadsheet altogether? If so you need to modify it to use import range:
=ARRAYFORMULA(IMPORTRANGE("spreadsheet url","'FormaData'!P2:P")&","&(IMPORTRANGE("spreadsheet url","'FormaData'!O2:O")))
Related
I usually do my data cleaning in python but the issue with python (pandas) is that when you read and print a table to excel it doesn't retain any of the excel formatting.
In this case I was given a large table where a lot of the cells are color coded and or commented. I need to retain all the coloring, comments, font styles and etc. I don't know how else to do that but to work in excel
The issue:
In one sheet I have a large table (400 rows x 45 columns). It is structured like below
Sheet 1:
|ID|C|D|E|F|
:--|:--|:--|:--|:--|
|EDMU025|1|2|3|4|
|EDMU026|5|6|7|8|
|EDMU027|9|2|3|4|
|EDMU028|5|6|7|8|
In another sheet I have a series of small tables which look like this
Sheet 2:
|ID|Date|C|D|E|F|
:--|:--|:--|:--|:--|:--|
|EDMU025|9/14/22|100|210|300|450|
|EDMU025|9/14/22|100|200|340|400|
|||||||
|Value to be replaced||100|200|300|400|
|||||||
|EDMU028|9/14/22|700|810|900|550|
|EDMU028|9/14/22|700|800|940|500|
|||||||
|Value to be replaced||700|800|900|500|
For each ID in Sheet 2 I need to find the ID in Sheet 1 and replace the values in sheet 1 columns C-F with the Values to be replaced.
The output would be:
|ID|C|D|E|F|
:--|:--|:--|:--|:--|
|EDMU025|100|200|300|400|
|EDMU026|5|6|7|8|
|EDMU027|9|2|3|4|
|EDMU028|700|800|900|500|
What is the most efficient way to do that for the entire table (while still keeping the original values that don't need to be replaced intact?)??
Try nested XLOOKUP() like-
=XLOOKUP(A2,Sheet2!$B$1:$B$15,Sheet2!$D$1:$G$15,XLOOKUP(A2,$A$2:$A$15,$B$2:$E$15,"",0),0,-1)
I am attempting to combine multiple columns that get filtered results from another workbook that uses checkboxes. The checkboxes when true send a ticker to another sheet but to 6 separate columns. My goal is to automatically form these tickers into their own column once sent to the other workbook.
The workbook which receives the tickers can look like this in each of their own columns.
(The format when I post this shows 8 columns but its only 6 FYI, A:F)
WTRH PRKR GESI REV XPON
#CALC!
SIMP CNTA
ELMS MNSO
CXDO
I tried doing a text join separated by a comma but it won't work anytime a column doesn't have a value. (Coming from the other spreadsheet column D is tickers from a portfolio, column E is insider buying, etc and sent by making checkboxes true)
Either way my goal is to get the tickers into one column with each in its own row automatically every time I check a box from the other workbook.
For instance
WTRH
PRKR
GESI
REV
XPON
SIMP
CNTA
ELMS
MNSO
CXDO
I'm still very new to VBA and after attempting to use intersect and making a row count I only got more confused. Any help is greatly appreciated! Thank you.
If you are open to go with formula then could try-
=FILTERXML("<t><s>"&TEXTJOIN("</s><s>",TRUE,IF(IFERROR(A1:H3,0)<>0,IFERROR(A1:H3,0),""))&"</s></t>","//s")
I have one sheet to record the raw data.
Now, I want to make another is for picking up the validated.
My Raw table is like the following
==Sheet A==
1--John--1992--Attend
2--Mary--1990--
3--Jam--1920--Attend
4--Mark--4820--
5--Aaron--4710--Attend
6--Chris--6893--Attend
And I expect having another sheet for picking up the "Attend" and export like this
==Sheet B ==
1--John--1992
2--Jam--1920
3--Aaron--4710
4--Chris--6893
So I tried this
=INDEX('Sheet A'!A1:B6,Match("Attend",'Sheet A'!C2:C6))
But the formula I wrote only exported the first row
==Sheet B ==
1--John--1992
How could I get the rest data?
Filter() formula is best fit for this case. Try-
=FILTER('Sheet A'!A1:C6,'Sheet A'!C1:C6="Attend")
Hey All on my excel sheet there is a column that i need to concatenate. I need the combine all the rows in the same colors into one row, I need to do this for a list of 10000+ rows. Any ideas?
ALSO THE COLORS I added in to explain what I need to combine, there are no colors in the spreadsheet.
In a helper column (just any empty column, I Assume AA here, change that to your needs) starting with row 1 (I assume the colored column is F, change that to your needs):
=IF(LEN(A2),F1,F1&", "&AA2)
copy down till the end
copy whole column
paste as values only (to column F)
Set filter to show only rows which are empty in column A
select all
delete all
turn off the filter
finished :)
If you are willing to use VBA it could be as simple as inserting this into a module and then using it with other regular functions to build your string:
Function WhatColor(r As Range) As Long
WhatColor = r.Cells.Interior.Color
End Function
If it has to be a "somewhat" native function, check out the GET.CELL answer here.
I have one spreadsheet which has 5 sheets
All the sheets share the same template, so they are alike. The only difference is the data
I would like to make another sheet, whichs gets all the data from column A3 (from row 3 to the end) in sheet 1,2,3,4,5, and puts it in 1 column in my new sheet.
How is this possible?
I am using Google Docs, but i guess Excel and Google Docs are much alike.
Thanks
=CONCATENATE(Sheet1!A:A,",",Sheet2!A:A,",",Sheet3!A:A,",",Sheet4!A:A,",",sheet5!(A:A))
This will concatenate A1,A1,A1,A1,A1 for sheets 1-5 on sheet 6. Drag it down to concatenate by cells (A2 then A3). You don't need to define the ranges A:A but you can if you want.
By far the best answer I've found to this question is found here: http://www.jessespevack.com/systems-leadership/2015/4/22/pulling-spreadsheet-data-no-scripts-required. In essence use ImportRange to pull in data from several other sheets. Then wrap those in an ArrayFormula so that they appear one after the other on the sheet. Lastly wrap the ArrayFormula in a Sort so that the blank lines are all left at the end.
Say you have Sheet1, Sheet2 and Sheet3 and you would like to combine columns A through E on MergeSheet. Put the column headings in the cells MergeSheet!A1:E1
Then in cell A2 enter a formula like this:
=SORT(
ARRAYFORMULA({
IMPORTRANGE("https://docs.google.com/spreadsheets/d/UniqueKey","Sheet1!A2:E");
IMPORTRANGE("https://docs.google.com/spreadsheets/d/UniqueKey","Sheet2!A2:E");
IMPORTRANGE("https://docs.google.com/spreadsheets/d/UniqueKey","Sheet3!A2:E")
,1,TRUE}))
The URL is the url of the spreadsheet, and can be copied from the address bar of the browser.
It's best to test that the IMPORTRANGE function works for each range individually before combining them into the one long function.
I don't think that you have a built-in function for such functionality.
You can easily write an Apps Script that performs this
var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();
var newData = new Array();
for (var i = 1; i <= 5; i++) {
var s = sheets[i];
var r = s.getRange("A:A");
// Go over the values and fill up a new range in sheet 6...
var data = r.getValues();
for(i in data){
var row = data[i];
newData.push(row);
}
}
This is the simpliest solution to merge multiple sheets of multiple google spreadsheets (with the same columns)
=SORT(
{
IMPORTRANGE("unique_spreadsheet_key1";"'Your first sheet'!A2:G");
IMPORTRANGE("unique_spreadsheet_key2";"'Your second sheet'!A2:G");
IMPORTRANGE("unique_spreadsheet_key2";"'Your third sheet'!A2:G")
};
3; TRUE
)
Based on dcb solution, but corrected (the SORT part) and without ARRAYFORMULA!
You can change 3 to sort your merged sheet by the column of your need !
unique_spreadsheet_key : just the key, doesn't neet complete url