I have a problem. I have multiple excel files all with a few numbers in a list. I need to take those numbers in those lists and see if those values are in another excel sheet with over 570000 values. Then mark the next column over with a yes or no. As it stands I'm looking up over a hundred thousand values individually using control F. I was wondering if it is possible to look up the whole list at one time. This problem could also be phrases as searching for multiple unique values in a sheet at one time.
Any help?
Thank you!
Edit: So if I'm trying to find 4 values in a list of 1000 values, is there anyway to get the cell next to each of those 4 values to say "yes"? Or is that impossible? The 4 values in this case would be the lists from other excel files.
A simple COUNTIF will show whether a value exists in another column no matter whether that column is on another worksheet or another workbook altogether.
Example: With both workbooks open, use this formula to find out if the value in A1 is in another workbook's (Other WB.xlsx) Sheet1 column B.
=IF(COUNTIF([Other WB.xlsx]Sheet1!$B:$B, A1), "Yes", "No")
If the two workbooks are open, you can Alt+Tab between to select column B from the other workbook while you are creating the formula. If you close the other workbook, the formula will reflect the full path of the closed workbook automatically like,
=IF(COUNTIF('C:\Users\user\Documents\[Other WB.xlsx]Sheet1'!$B:$B, A1), "Yes", "No")
You can fill the formula down quickly by simply double-clicking on the small black square drag handle in the lower right of the the cell.
Related
In my worksheet in column F I have a list of names, that may appear or disappear according to other inputs in the spreadsheet. I want the cells in the columns G:AZ to remain blank if the corresponding cell (i.e. same row) in column F is also blank. Because I have thousands of cells to which I need to apply this, I'm using Pullover's Macro Creator to add this small change to all the formulas inside the cells really quickly, so I can do entire columns in seconds. In column J, for example, I've been applying this formula:
=IF(COUNTBLANK(INDIRECT("RC[-4]",0))=1,"",[this part changes and doesn't matter])
You can see that I need to change that "-4" to different numbers according to the column I'm working on. But I have so many columns that it's still going to be a pain to change that hundreds of times.
My question: Is there a formula I can use in the COUNTBLANK function that can reference the corresponding cell in column F without needing any changes in different columns and different rows? And since the INDIRECT formula is so volatile (I still don't know what that means, but I guess it's bad), is there a solution that doesn't use this formula?
I have data in two separate excel sheet in single file.
In the first sheet, I have two columns...like this
Sheet1
In the second sheet, I have one of the column which is same as Name in Sheet1. However, it does not have second column where I want to bring the value referring to the sheet 1.
Here is the second sheet.
Here in second column, i.e. Color I want to bring the value from first sheet.
I am using Libreoffice but can use excel as well. Pls suggest how I would do this in excel / libreoffice.
Solution for Excel...
So use sheet one as the reference sheet. Sheet two as the one you want to fill.
In B2 on Sheet 2 enter this formula:
=vlookup(A2,Sheet1!$A$1:B$6$,2,FAlSE)
Then drag down.
This is assuming that your reference in sheet one is in columns A and B and goes from rows 1 to 6.
Hope this helps.
One of the easier ways to do this would be to use VLOOKUP. So this requires 4 inputs:
The value you are searching for
The array you are searching in
The column where the value you want to return is in
"FALSE" to list if you want an exact match between the value you are searching for and the array you are searching in.
So in your example, we will use the worksheet where you only have the Names listed as the worksheet you are putting the formula, so something like this in B2:
=VLOOKUP(A2,sheet2!$A$2:$B$6,2,FALSE)
So this would lookup the value you show in worksheet 1 cell A2.
Then go to workbook 2 and match that value with what is in A2:A6.
Then lookup what is in column 2 for your answer.
And return what is in column 2 only if worksheet 1 cell A2 and something in worksheet 2 range A2:A6 is an exact match.
There are other ways, but for your example, this should be easiest in EXCEL. This only works if the value you are searching for is to the right of the value you are looking up. If you need to go to the left, INDEX/MATCH would be better (but not required here).
Hope this helps!
JW
I’m very new to VBA, not really sure where to start. I have two separate workbooks saved in the same folder. What I am looking for is when column A is populated in workbook 1;
I want a macro that searches for that number in workbook 2 column C. If a match is found then I want the corresponding value from column F in workbook 2 to be copied onto column I in workbook 1:
If a match is not found just leave the cell blank.
If more than one match is found, use the greatest number.
Sometimes workbook 1 has multiple pages as well.
Workbook 2 won't be opened by the user, they will just populate the data in workbook 1 and the macro runs automatically if data in column A changes.
Any help is appreciated.
I'm not sure you need VBA here, but I'm brand new to VBA. This is what I would use, and I'm sure someone can convert this to VBA. For reference, I'm calling your workbooks Book1 & Book2. In Book2 (the one you want the result in) use this formula:
=IF(MAX(IF([Book1]Sheet1!$C$2:$C$20000=A26,[Book1]Sheet1!$F$2:$F$20000))=0,"",(MAX(IF([Book1]Sheet1!$ C$2:$C$20000=A26,[Book1]Sheet1!$F$2:$F$20000))))
To make this an array formula, go back to the cell with your formula, hit F2 & then CTRL+SHIFT+ENTER, and it will put brackets around your formula to make it look like this:
{=IF(MAX(IF([Book1]Sheet1!$C$2:$C$20000=A26,[Book1]Sheet1!$F$2:$F$20000))=0,"",(MAX(IF([Book1]Sheet1!$ C$2:$C$20000=A26,[Book1]Sheet1!$F$2:$F$20000))))}
You can then drag that formula down or fill down that formula.
Note: $C$2:$C20000 & $F2:$F20000 is assuming that your part numbers & prices or whatever they are start on row 2, and there are less than 20000 rows, if it is more, just replace the 20000 to however high you need. The A26, appears to my old eyes to be the first cell in which you are typing in the part numbers which correspond to Sheet1 column C.
I have no coding experience, just trying to pull together a function within a spreadsheet at work to save everyone a lot of time - would be great if anyone could help me!
So I have an excel workbook, which has multiple columns of values within one sheet, which I would like to copy across to another sheet. But I only want to copy specific columns, dependent on the presence of a value in a different column for each row.
So for example:
Sheet 1
So I'm looking for a way to check for the presence of ANY value (ie just not an empty cell) in column C, and if there is a value present in column C, to then copy the values from columns A and B into a separate sheet in the workbook. I would need it do this check for each row within sheet 1 and copy them all as separate rows into sheet 2.
Is this possible?? Ideally without the use of VBA as I have a feeling adding this in to an already shared workbook may slow it down to the point of not being able to be used?!
Thank you!
Assuming Sheet1 is as follows
Then in Cell A1 of Sheet2 enter the following formula
=IFERROR(INDEX(Sheet1!C$1:C$5,SMALL(INDEX(NOT(ISBLANK(Sheet1!$C$1:$C$5))*ROW($C$1:$C$5),0),COUNTBLANK(Sheet1!$C$1:$C$5)+ROW($C1))),"")
Drag/Copy down and across (to right) as required. Change range as per your data. See image for reference.
I want to transfer data automatically from 2 sheets to one single combining one. That means I have 2 different export sheets (called 'Te_open' and 'Te_closed') that contain both the columns "Problem" (in different positions, can vary always). I have one sheet, that represents an overview of the data from the two other export sheets. So when I have for example the value "Te1" in the cell A2 of my overview sheet, I want Excel to search in the two export sheets the value "Te1" and give back the value in the same row as "Te1" but of the column "Problem", so that I can fill the cell B2 where I want to have the Problem type. So I thought I might need the "MATCH" formula, to let excel know I want to search the column with the headline "Problem" in the export sheets, to fill the column "Problem" in my overview sheet.
The problem that I see is that I have to search TWO sheets and I don't know in which one the "Pm1" will appear. Furthermore I don't know in which column of the sheet "Problem" will appear.
Can you please help me? I would preferably like to solve the problem with a formula, not a macro. Thank you very much in advance.
Kind regards,
question
To find the index of the first column in one of your sheets that is headed 'Problem', you can use (e.g.):
=MATCH("Problem",Te_open!$1:$1,0)
Let's assume we place that formula in a cell somewhere and name the cell open_col. To find a value in column A of Te_open and return the corresponding value from the 'Problem' column, you can then use:
=VLOOKUP(A2,Te_open!$A$2:$Z$999,open_col)
Note that you'll have to define the search range to include the largest range that your data on Te_open could occupy. If the search value is found this will return the corresponding value from the 'Problem' column, otherwise it'll return #N/A. So if you've also set up a cell called closed_col to get the column index for the Te_closed sheet, you can do:
=IF(ISNA(VLOOKUP(A2,Te_open!$A$2:$Z$999,open_col)),VLOOKUP(A2,Te_closed!$A$2:$Z$999,closed_col),VLOOKUP(A2,Te_open!$A$2:$Z$999,open_col)
That gets the result from the correct column of Te_open if the search value was found there, otherwise it gets the result from the correct column of Te_closed. If neither sheet contains the search value it'll return #N/A.