We are going to use a Sales Report of a particular grocery store. This dataset concludes the Sales Rep, Order Date, Product Name, and the corresponding Sales amount in columns B, C, D, and E, respectively.
Method 1 – Find a Single Value
Step 1 – Import Excel File to Sheets
- Create a blank spreadsheet in Sheets.
- Go to the File tab.
- Select Import from the list.
The Import file dialog box appears.
- Move to the Upload tab.
- Click on Select a file from your device.
The Open window appears.
- Select the folder where you kept the file.
- Select the desired file.
- Click on the Open button.
The Import file dialog box pops up.
- Select Replace spreadsheet as the Import location.
- Click on the Import data button.
The dataset is available on the Sales Report Google Sheets spreadsheet.
Step 2 – Insert a Formula
- Copy the URL of the Sales Report sheet.
- Move to the new sheet named VLOOKUP from Excel to Google Sheet. We can see the columns of ID and names of the Sales Rep are already present. We just have to extract the corresponding Sales amount for each Sales Rep.
- Select cell D5 and enter the following formula.
=VLOOKUP(C5,IMPORTRANGE("
https://docs.google.com/spreadsheets/d/1X-EnXzl_fr4VXuNjU9aaVXTxHaDd3wRYT37tN8pkI7E/edit#gid=883122238","Dataset!B4:E14
"),4,FALSE)
C5 is the cell reference for Jonas, because we want his sales. The part inside the double quotes of the IMPORTRANGE function is the URL of the Sales Report sheet. This function helps to import data from another Google Sheet. 4 is the index of the VLOOKUP function as the Sales column is in the 4th position of the table in the Sales Report sheet. We used FALSE as the dataset is not sorted.
- Press Enter.
But we cannot see the proper results in cell D5. Rather, it shows a #REF error.
- Click on cell D5.
- This will show an error notification You need to connect these sheets.
- Click on Allow access in the message box.
Here’s the output in that cell, which is 6200.
- Bring the cursor to the bottom-right corner of cell D5 and it’ll look like a plus (+) sign. This is the Fill Handle tool.
- Double-click on it.
All the remaining cells get their outputs as the Fill Handle tool copies the iterated formula to the following cells.
Step 3 – Compare the Excel File to Sheets
The right one is the Excel file, and the left one is the Google Sheet.
Read More: How to Save Excel Files to Google Sheets
Method 2 – Fetch Multiple Values in the Same Column
Steps:
- Go to cell D5 and insert the formula below.
=ARRAYFORMULA(VLOOKUP(C5:C14,IMPORTRANGE("https://docs.google.com/spreadsheets/d/1X-EnXzl_fr4VXuNjU9aaVXTxHaDd3wRYT37tN8pkI7E/edit#gid=883122238","Dataset!B4:E14"),4,FALSE))
The VLOOKUP function will return the lookup value of all the sales reps in the C5:C14 range. We’ve added the ARRAYFORMULA function to get an array output.
- Hit Enter.
Method 3 – Apply the VLOOKUP Function with a Wildcard for Partial Matches
Steps:
- Select cell D5 and paste the following formula into the cell.
=VLOOKUP("Jon*",IMPORTRANGE("https://docs.google.com/spreadsheets/d/1X-EnXzl_fr4VXuNjU9aaVXTxHaDd3wRYT37tN8pkI7E/edit#gid=883122238","Dataset!B4:E14"),4,FALSE)
We’ve used “Jon*” as the search_key. The function will search for text strings containing these texts and will return the Sales amount.
- Hit the Enter key.
To extract the sales from Harry, edit the formula a little bit.
- Write down “Ha*” instead of “Jon*”.
- Press Enter.
Things to Remember
Before using the IMPORTRANGE function, make sure to change the privacy of the sheet from Restricted to Anyone with the link. Otherwise, it will return the #REF error.
Download the Practice Workbook
Related Articles
- How to Open Password Protected Excel File in Google Sheets
- How to Link Excel to Google Sheets
- How to Sync Excel to Google Sheets
- Solved: Excel Formulas Not Working in Google Sheets
<< Go Back to Export Data from Excel | Learn Excel
I need some assistance.I can’t make the vlookup work in my excel sheet.I maintain a medium large sheet for my small business.I have salesman name in first column,their job id in second column,their location in third,their month based sales amount in fourth column.But whenever i try to acquire their sales with the job id as lookup value,it gives N/A error in cell.My formula is =vlookup(A15,A2:D11,4,false).I put all the parameters prooerly.But why isn’t it working?Could you gimme a hand?
Hello THORSTEN LEMANN,
I’ve got your problem. I tried to replicate your dataset and also, applied the VLOOKUP function to fetch the monthly sales of a particular sales rep based on his/her ID. See the image below.
Notice that my lookup_value is in the first column of my table_array. Always make sure to maintain this. Otherwise, the VLOOKUP function will not work. Your mistake was that you were keeping your lookup_value in the second column of your table_array. That’s why the formula wasn’t operating and showing #N/A as output.
So, be cautious next time. That’s all from me on this topic. You may follow our website, ExcelDemy, a one-stop Excel solution provider, to explore more. Happy Excelling.