Solved

Filter pc-names (v-lookup?)

Posted on 2014-07-22
10
125 Views
Last Modified: 2014-07-24
Hi,

I have an Excel with 2 sheets. Each sheet has a list of pc-names (in a column).

First sheet has all pc-names with owner, department etc. Second sheet contains pc-names which needs to be matched to first sheet. In other words: we need to know which pc (of second sheet) belong to who (data on first sheet).

Hope this is clear. Plase advise.


J.
0
Comment
Question by:janhoedt
  • 4
  • 3
  • 3
10 Comments
 
LVL 24

Expert Comment

by:Steve
ID: 40211433
Could you post a simple example file in a format similar to your file.

It will be easier to create the required formula with this.

As you may need VLOOKUP or an INDEX&MATCH.

ATB
Steve.
0
 
LVL 24

Expert Comment

by:Steve
ID: 40211439
Attahced is a ver simple example of a VLOOKUP.
Having your file layout will make life a lot easier to get a tailored solution.
C--Users-shall-Desktop-Vlookup-Example.x
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 40211442
basically VLOOKUP, but it depends on the data structure. Do you have, in 1st sheet, pc names in separate cell or it is combined with other data in one cell?
Check my sample how to use VLOOKUP applied to your request
sample.xlsx
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:janhoedt
ID: 40211750
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 40211922
Based on your screenshots it is possible.
As I understand it yoi will check if hostname in tab2 (column A) exists in tab1 (column E).
Result of this comparison could be in column B of tab2. Do you want to match some value from tab1 as result or som text like OK and MISSING or?
0
 
LVL 24

Expert Comment

by:Steve
ID: 40213566
OK, looking at the two immages you will need to use INDEX and MATCH together rather than a VLOOKUP.
This is due to the computer name looked up being in a more right column than the name being retreived.

The formula would look like:
=INDEX(Sheet1!$C$2:$C$999,MATCH(Sheet2!A3,Sheet1!$E$2:$E$999,0))
(the 999 may need to be increased or decreased based upon the number of rows on sheet 1)

I have also written the following, which checks for existence of the Computername in the list before doing the search:
=IF(COUNTIF(Sheet1!E:E,Sheet2!A2)>0,INDEX(Sheet1!$C$2:$C$999,MATCH(Sheet2!A3,Sheet1!$E$2:$E$999,0)),"Not in list")

The attached file show these as working examples.
Hoefully this will get you in the right direction.

ATB
Steve.
C--Users-shall-Desktop-IndexMatch.xlsx
0
 

Author Comment

by:janhoedt
ID: 40213767
Thanks! But I'm not fully getting it.
In att. the Excelsheet as example. Goal is to match  the sheet "pc's to be migrated"  to their owner (=sheet "ALL pc's and their owners).
lookup.xlsx
0
 

Author Comment

by:janhoedt
ID: 40213918
I hope I was clear in last update. Hereby a screenshot from what I'm trying to achieve.
lookup.jpg
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 40213926
no problem to do it like you want, but for VLOOKUP you should have lookup values in tab1 in front of data you want to enter when positive match. That´s why I moved column with hostnames (E) infron of Account name and department.
See sample in attachment
lookup-sample.xlsx
0
 
LVL 24

Accepted Solution

by:
Steve earned 500 total points
ID: 40214346
The two formula you need are:

=IF(COUNTIF('ALL PC''s and their owners'!E:E,A6)>0,INDEX('ALL PC''s and their owners'!$C$2:$C$999,MATCH(A6,'ALL PC''s and their owners'!$E$2:$E$999,0)),"Not in list")

and

=IF(COUNTIF('ALL PC''s and their owners'!E:E,A6)>0,INDEX('ALL PC''s and their owners'!$D$2:$D$999,MATCH(A6,'ALL PC''s and their owners'!$E$2:$E$999,0)),"Not in list")

Plase see attached.
28481079lookup-sample.xlsx
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question