Build hyperlink with VLOOKUP [duplicate] - excel

I have a status update sheet (sheet1) in which team members have a line per action, and each action has a reference number (s1, columnA).
In another sheet (sheet2), I have the team leads write their own status updates, but they may not necessarily reference every single reference number, nor will they do it in the same order as sheet1.
Basically, what I'm looking for is a column in sheet1 to show a link automatically IF the reference number in columnA sheet1 is also found somewhere in columnB in sheet2.
Is this possible? If so, how would I work this? I'm hoping to use a formula, but I'm not sure if that's possible. Hoping to use VBA as a last resort since this will be a shared spreadsheet and the probability that someone might screw it up is decent.
Thank you, and please let me know if I should clarify anything.

What you are looking for is a dynamic hyperlink.
So, let's assume that you have on Sheet1 all the
team members with the (column B)
team leads and the (column A)
reference / project numbers (column C).
On Sheet2 we have a table with various information and the same reference / project number in column E.
Then you can add a new column D to the table on Sheet1 which you might want to name Links and the formula here should be:
=HYPERLINK("#Sheet2!E"&MATCH(D2,Sheet2!E:E,0),"Link to "&D2)
If you are using tables with named columns that you can also use:
=HYPERLINK("#Sheet2!E"&MATCH([#[Reference Number]],Sheet2!E:E,0),"Link to "&[#[Reference Number]])
Of course you can adjust the alternative text to something more suitable.
Maybe the following picture helps explaining the above:

Related

amounts and ageing in excel

I have two excel files that I need to cross reference amounts in.
The first sheet looks like the below:
what I need to do is find any amount that are contained on sheet 2 and the month they fall into.
Sheet 2 looks like below:
for example on sheet 1 I have 56.49 in column C for reference AK1080117 in column A and this shows as Person 8 on sheet 2.
I can see this is correct as on sheet one it has a transaction date of 08-jan and on sheet 2 is in the column JAN.
There is no same ref that can be used between sheet 1 and 2 as sheet 1 has Reference and sheet 2 has Name.
Can anyone advise the best way to do this.
The complete sheets are hundreds of lines long.
Many thanks,
Note: Make sure your data has unique values AND it is not exceding the year 2017
If so, I have found a way to maybe do this in a few steps:
1: Add another column E to your first sheet and add this formula to second row of the column and drag it all the way down:
=SUBSTITUTE(ADDRESS(1,MONTH(B2)+1,4),"1","")
2: Now create another column F next to the freshly made one and put this formula in second row:
=MATCH(C2;INDIRECT("Sheet2!"&E2&":"&E2);0)
3: Now create a third column G and put this formula in second row to be dragged down:
=INDEX(Sheet2!A1:D15;F2;1)
4: Now you have created a cross-reference because column G will show you the person with a match.
Edit: You can combine the three formulas direclty obviously but my personal preference is to brake things down to make them easier to understand :)
=INDEX(Sheet2!A1:D15;MATCH(C2;INDIRECT("Sheet2!"&SUBSTITUTE(ADDRESS(1,MONTH(B2)+1,4),"1","")&":"&SUBSTITUTE(ADDRESS(1,MONTH(B2)+1,4),"1",""));0);1)
Good luck with it!
You need a third table that has Reference and Name. Then you can use lookup functions or table relationships to link the data together.
Ask the source of the first table to include Name as a field.

Copy data from another cell if criteria is met

I have quite a problem. In the excel spreadsheets, I have a lot of data entered into one main spreadsheet and some of the into another.
In the main Spreadsheet (Sheet1), I have column L, that has tons of entries of unique numbers. Also, I have a column Q that stores another data for a lot of entries into the sheet.
In another sheet (Sheet2), I might have some of the entries that can be the same with the column L in the Sheet1, and they are stored in column D, on Sheet2. So, if those two sheets entries matches (L:L in Sheet1 with D:D in Sheet2), I want to have the Q entry from Sheet1 into my, lets say N column at Sheet2. If they don't match, blank would be ok.
I've been searching the solution for quite a time, found some on Microsoft official website, but I haven't been able to apply it.
This one was the closest solution I could find, but, since I'm newbie with Excel, I haven't been able to implement it correctly.
Edit:
To Illustrate a bit, here is exactly what I am looking for:
Lets say:
Sheet1
L2=115457; Q2=2148446
L3=381493; Q3=Blank
L4=121214; Q4=484846
L5=151515; Q5=Blank
Sheet2
D143=381493; N143=(need input from Q2)
D523=121214; N523=(need input from Q4)
D968=151515; N968=(Blank)
Thanks in advance.

Excel, Compare values from different sheets, if they match return data from a third column

I admit that I am pretty new to using formulas in Excel, so i am looking for some help. I tried looking at some other examples of similar questions and tried working through it before asking here.
Onto the question: Basically I fairly large data set. I am trying to match Names on files with Names on the employee list and then auto-fill what department they work in.
On one sheet (Lets call it Sheet1) I have HR Data the includes their name (column A) and department (Column B). On another Sheet (lets call it sheet2) I have all the file names (Column A) I want to match it to. On sheet 2 I did a vlookup to match the names on the files with the names on HR (Column B), no biggie there. But now I want to basically say IF the Name matches on Sheet2 to Sheet1, pull the value from Sheet1 Column B into Sheet2.
I tried to use an IF originally, but it seems like IF statments dont let you use a range (match Sheet2 B2 to Sheet1 A:A) and wants to match exact cells (Say Sheet2 A2 to Sheet1 A2) if that makes sense? There are people with multiple files belonging to them in sheet 2, but they are only listed once in Sheet 1.
Thank you for the help.
Thank you all for responding. I know it was hard to follow what i was saying, and i really wish i could post up what im working with, however I work with PII and cant post it.
I was able to find an answer to my question with some more google searching and experimenting. If anyone has a similar problem to me, use the =INDEX funciton. The link below is what i used:
https://superuser.com/questions/669610/comparing-columns-in-two-different-excel-sheets-and-if-they-match-copying-third

ExcelNewbie: Matching cell information across worksheets

Please forgive me if this is simple...I am not an Excel expert and this is causing my nose to bleed(!)
Firstly I am using Excel 365.
I am working on a Bonus Calculator Sheet and the system is VERY complex, but I have reduced it to a two column table.
Column A is the company success "number" and column B is the % bonus it draws. This is all on worksheet B.
Worksheet A contains salary stuff and the company success number sits at the top and is not changed. What I need to do in pseudocode is:
Take value from Sheet A Cell A1
Find match in Sheet B Column A.
Return value next to it in Column B to Sheet A somewhere.
My life is mainly spent in the world of Python and this looks SO simple - but any help you experts could offer would just make my day rosier...if anyone can help I will give my two dogs a biscuit to show the love(!)
Thanks.
Seems pretty simple.
=VLOOKUP(A2,SheetB!A:B,2,FALSE)
You could also try using index match formula
=INDEX(SheetB!B:B,MATCH(A1,SheetB!A:A,0))
Where A1 is the value that you want to lookup in SheetB in range A:A.

Can I pull correct values for a variable from an old spreadsheet into a new one that's missing those values?

I have an excel spreadsheet with several columns, each representing different variables collected from various patients (rows). One of the columns is the unique medical record #, another is a unique visit identification #. The problematic one is "age." I must have inadvertently dragged and replaced the ages of about half of my subjects, since I doubt that >3000 of my 6000 patients are 54 years old.
I have the original file with correct ID# and age pairs, but I've done considerable work on this file and cannot start over. Is there a way in my new file to look at the ID# in column C, go to the old excel file, find that ID#, go over 3 cells to column F (age), copy that age value, go back to the new excel file and paste the correct age for each ID#?
I cannot simply sort both files by ID# and copy/paste all of the ages as a number of the cases have been intentionally removed and so the ID#s wouldn't match up because the total N is different.
I also have SPSS and R available to me, although I'm not particularly proficient with either.
Just, as an example, here's what the two spreadsheets look like:
http://imgur.com/OjZsLEJ
I've manually highlighted the bad values, but in reality there are 3000+ of them and manually checking would be very time consuming.
Thanks in advance!
A VLOOKUP function should work here:
=VLOOKUP(C3,[OldWorkBook.xlsx]Sheet1!$C:$F,3,FALSE)
If you place this function in Column C, Row 3 of the New Workbook and then change "OldWorkBook.xlsx" in the function to reflect the name of your old Workbook, it should return the correct value from your old Workbook.
You can then copy that formula and paste it into the remaining cells in that column.
If the values are correct, you can copy them, Right-Click and select "paste values" to solidify them in your new workbook.
If I've understood your question, that should fix the problem. If not, please let me know.
You can do that with a VLOOKUP formula.
It should look like this (check if the cell references are right, and also the file and sheet name).
You should put this in a new column in your "NewFile".
The formula references the "OldFile" and should bring the value for the "F" column in the "OldFile" whenever the values for the "C" column are the same.
This example would be for the second row of the file (I am assuming the first row are column headers).
=VLOOKUP(C2,'[OldFile.xls]Sheet1'!$C$2:$F$6000,4,FALSE)

Resources