Copy data from a table to another in Excel - excel

I'm new in Excel and I have a little problem.
I have a table with some names and their age, names are sorted alphabetically, and I have another table with same names, but they're random, and what I want is to copy the age from the first table to this second table for every name. The thing is that I can't with copy paste, because when I have 1000 names in my table.
As you can see, I want to copy the numbers from the first table from "Venit" to column "Venit februarie" for every name in the column "Nume".
Any solution?

Assuming that these are in the same sheet itself we will use this command.
=LOOKUP(H4,$B$3:$B$12,$D$3:D$12)
Explanation:
LOOKUP(lookup_value,lookup_vector,result_vector)
The lookup_value just mean what are we looking for? What cell or static input are we going to reference?
loopup_vector just means from what SINGLE column OR SINGLE row will we use? What cells are we going to use?
result_vector means IF we find a matching value, what the location of that data should we pull from?
UPDATE:
This formula was designed for you to paste into I4 and drag and drop the formula in the other cells.

Related

How to find highest value in adjacent column and paste the name and the value to another range

I have a table like
tABLE
A list of the name in the first column and a list of there score each time. I want to find each players highest score and paste it to another place.
End result should be
Table2
This is a simpliefied version of what I have but is essentially the same thing, I am using this within a vba project but happy to use formulas and get the macro to fill them in.

Import data from nth columns to another sheet

I'm trying to import all data from nth columns, starting from the 3rd row, from one worksheet ('Dataimport') to another ('Cleaned Data') in the same spreadsheet, but so far I have only managed to get a specific cell from every nth column:
=INDEX(Dataimport!$C$3:$HI$3;(ROWS($A$1:A1)*6)+1)
Right now I'm doing it manually, using =TRANSPOSE(IMPORTRANGE("1yyb1k0uAdN1XcLWBhNq4jA0eInnePRoUt9IbuXDmfEU";"Dataimport!I3:I300")) in every cell, so that the column data is imported horizontally (this is how it's supposed to look like):
The sheet with data looks like this. Here I want to retrieve data from every 7th column starting from column C:
Any idea how I do this?
Public link:
https://docs.google.com/spreadsheets/d/1hXFiSoduVjcZ6fbOcyp-BfI7m4So-01umLS0kBm-lVI/edit?usp=sharing
Proposed solution
Given your attempt =INDEX(Dataimport!$C$3:$HI$3;(ROWS($A$1:A1)*6)+1), I would suggest using the Google Sheets Formula OFFSET that allows specifying indexes as mathematical operations.
You will be able to specify the column offset with a simple mathematical operation in order to get the next needed indexes for the rows below.
Here is an example:
=TRANSPOSE(OFFSET(Dataimport!C$2:C$199;1;(ROW()-1)*6;199;1))
With this formula you can obtain the right column form the Dataimport Worksheet and then transpose it in order to fit it in a row.
Putting this formula in the Clean Data "D2" Cell will compute a column offset of 6 starting from the 3rd column ("C") considered in the OFFSET formula. Dragging down the formula will adjust the column offset index to the needed 7 columns range.
Reference
OFFSET
I think I have a solution.
I've build a spreadsheet with dummy data and then I made a formula that takes every nth column from the table.
Here is my solution:
https://docs.google.com/spreadsheets/d/1J6x4H_cNczRRo40Ri6Nwa-YnZOISpxZmG4-JZ7tA1kA/copy
First I make an ID column to both tables to let vlookup work
I use vlookup and arrayformula formula for this:
For grabbing multiple columns I use sequence formula within vlookup.
This makes an array of numbers with defined step. So if you can have every 6th column you define step as 6. Here step is defined in cell c23
=ArrayFormula(vlookup(A24:A43,A2:AB21,sequence(1,5,4,C23),false))
Of course it can work in multiple sheets or files. You just need to use importranges instead of standard references to a range.

Adding in information from one spreadsheet to another

Good Morning,
I have a spreadsheet with 40,000 products and a spreadsheet with 35,000 products all with item ID's
Is there anyway I can add in the missing 5,000 ITEM ID's using a forumla? I dont want to manually go through each item and see what is missing
Thank you very much for your time and help
Cheers
If ColumnA holds the unique ID's in each sheet please try:
=COUNTIF(Sheet1!A:A,A1)
in Sheet2 and
=COUNTIF(Sheet2!A:A,A1)
in Sheet1, both copied down to suit.
Then sort both on the results of these columns and copy those that result in 0 from one sheet to the other to ensure complete sets in both sheets and to check whether either sheet has duplicates.
next to column "A" in your longer list, put a formula in cell B1 assuming your data starts from A1:
=if(isna(VLOOKUP(A1,**column A of first shorter list**,1,false)),"Missing","Exists")
and populate down until the end of the list, the entries reading "missing" are the ones that are missing from the first list.
I assume your list of source IDs lays in Sheet1!A2:A40001, row 1 is for headers. The target IDs are in Sheet2!A2:A35001
Detect which are missing.
Use the following formula in Sheet1!B2:
=MATCH($A2,Sheet2!$A$2:$A$35001,0)
Copy down to Sheet1!B2:B40001.
Filter out those already present.
Select row Sheet1!1:1. Use Data -> Filter. Go to the drop-down arrow in cell B1, and select only #N/A.
Copy those missing.
Select all values shown in column Sheet1!A:A. Copy, and paste below the last value in column Sheet2!A:A.
It is easy to figure out how to do the same if you have adjacent columns with relevant data that you want to copy as well.

Entering repeating data in Excel

I am a travel agent and maintain a data base tracking my commission. I am constantly adding new bookings which consist of a hotel name, address and zip code. Many of these hotels I use quite frequently so when i type the name of the hotel in cell A1, I wold like cell A2 to automatically populate with the address, cell A3 to populate with the state and cell A4 to populate with the zip. I could eliminate a lot of data entry. How could I do this.
In another sheet enter the information for all the hotels. I suppose that you could have unique names for your hotels. You can use VLOOKUP() to search that table and populate that information.
If you want the information to appear automatically, just have more rows of formula than you have data on your sheet and use IFERROR() so that if there is no data entered into the first column you do not display an error.
As you can see here, the information is retrieved via VLOOKUP on another sheet and the formula you see is in B2. Normally that cell should display #N/A but since we are using IFERROR() this does not happen and you have a nice output.
And here because I think you might not be familiar with VLOOKUP. VLOOKUP has 4 parameters:
The value to look for;
The range in which 1) the value to look for is and 2) the value to retrieve is;
The number of the column in which the information to retrieve is;
0 if you want an exact match, 1 if you want an approximate match
You just have to remember that VLOOKUP will always use the first column of the supplied range to search for the specified value so you 'key' has to be in the first column.
Create an additional worksheet containing the hotel data and then use something like vlookup from your primary worksheet.

Copy duplicate values from one column to a separate sheet

I have a list of names in one column in sheetA. I want to copy the duplicate names from sheet A to sheet B and also provide a count of those duplicate names beside each copied name in sheet B.
I’m guessing it is ‘manually’ so would suggest a helper column in sheetA with =COUNTIF(A:A,A1) copied down (assuming your list of names starts in A1. For each row this should count the number of rows that contain that row’s name.
Copy ColumnA:B into your sheetB with Paste Special Values, then use Data > Data Tools – Remove Duplicates and filter and delete all rows with 1 in the count column.
easiest method I can think of would be a pivot table, rows=names, columns=count of names, filter table for counts greater than 0? then when you want to run a fresh report, past in the original information and refresh the table?
Probably way too late to be helpful, but maybe for the next person...

Resources