Autocomplete columns in Excel 2010 - excel

I'm a very new in Excel 2010! Well, I have a book with 3 column (A,B,C). A contains Id(1,2,3...100), B contains the reference numbers (any unique integer numbers) and C - with empty cells. So, I want to get in C column something like that (http://localhost/img/.jpg) I meant I want to get an autocomplete text column C with the data from column B in the 100 cells range
Could you please explain how I can do that?
P.S. I start the range count from a second cell because first cell contains a text-header data.

This should join everything perfectly.
=C2&B2&".jpg"
Copy the formula down the column and it will auto-fill for the rest.

Related

How to lookup a value from another column and display Row number?

I'm setting up an excel file for the operators. They will scan the Barcode from the product and it will populate in one of the column of the excel sheet.
I have tried using LOOKUP formula in excel but it doesn't seem to be working right.
COL A : Data from Database
COL B : Data from Scanner
COL C: Row number
Find the value of Column B in Col A and populate the Row no. in Column C.
=LOOKUP(B5,A:A,ROW(A:A))
I have used this formula in every cell of the column C.
The row number don't populate accurately.
=MATCH(B5,A:A,0) should give you the rownumber. And if you wish to obtain the cell's address: =ADDRESS(MATCH(B5,A:A,0),1,4,1)
If you are using combined cells then you definiately want to use absolute ranges like =MATCH(B5,$A$5:$A$10,0)
Search B column in A column and get row back. You could use:
Note:
Do not forget to use IFNA in case of B does not included in A.
In my opinion there is no need to target whole range.
=IFNA(MATCH(B1,$A$1:$A$6,0)+ROW($A$1:$A$6)-1,"")
Results:

How to arrange small size of excel rows (subset) according to large size of other excel rows?

I have excel sheet with 500 rows and more than 10 columns. The first column is subject id.
And I have list of subject id approximately contains 2000 id. The 500 id in the spreadsheet is subset of the external 2000 id.
I want to arrange the spreadsheet rows according to the external list of ids.
Edit:
I have spreadsheet 'A' of 500 rows
and spreadsheet 'B' with 5000 rows
I want to edit spreadsheet 'A' by place its rows at the same position (row number) of its occurrence in 'B'.
In other words, you can see from above pictures that:
First subject of 'A' '2196978' is located in row number 2 in 'B'. My task is to put '2196978' of 'A' in row number 2
Second subject of 'A' '2219364' is located in row number 9 in 'B'. My task is to put '2219364' of 'A' in row number 9
and this is done by insert rows in 'A' if the subject of 'B' is not exist in 'A'.
This result is what I want:
Without resorting to Macros I don't think what you want to achieve is possible, however it is possible to get something very close. The core issue is that a function cannot create rows so you have to start with the number you want to end up with.
I my proposal you end up with a 3 Book solution. Book A with 500 rows, Book B with 2,000 rows, and Book C which is the result also with 2,000 rows but many of them blank.
You would start by creating Book C with a complete list of IDs from Book B i.e. all 2,000 of them. This could be a copy and paste or you could assign them using the Excel = function. For this example put them into column "A".
Next we want data to appear only if it is in Book A. We do the lookup using VLOOKUP() and if the data is missing we get a #N/A error.
So before things get complex in column B of the new Book add the formula:
=IF(ISNA(VLOOKUP(A1,[BookA]Sheet1!$A$1:$A$200,1,FALSE)),"row missing","row there")
This will return a text message indicating if the row exists in Book A and will be used as a flag to display the remainder of the data.
Check this works and if it does change it to:
=IF(ISNA(VLOOKUP(A1,[BookA]Sheet1!$A$1:$A$200,1,FALSE)),FALSE,TRUE)
We now want to get column B, C, D etc. from Book A based upon the True/False flag we have created. So column C in the new sheet is something like:
=IF($B1,[BookA]Sheet1!B1,"")
If you have the $ signs in the right places is should copy and paste nicely.
You have 2 options for improving this and getting nearer your objective.
Embed the initial lookup in the 2nd IF statement
Use conditional formatting to turn the text white if it should not be there (including the ID)
I have not done either of these because it is un-readable and is basically write once code that you can never modify without starting again.
Good luck.
You have to use the below formula in spreadsheet B which contains 5000 rows,
=IFERROR(INDEX(SheetA!$A:$J,MATCH($A2,SheetA!$A:$A,0),COLUMN()),"")
This is a simple INDEX - MATCH formula which looks up values in SheetA matches it with SheetB and prints output in SheetB. Use the formula in SheetB cell B2.
Explanation:
A2 cell in SheetB is matched with A:A in SheetA.
If found, pulls all the column data of that item from A:J from SheetA.
Once you pasted the formula in B2, drag it across all required columns. Then drag the same across all rows or just double click the fill handle, so that the formula is filled for all 5000 rows and data is pulled.
Let me know if you face any difficulties. Hope this helps.

Need help in excel to perform 4 cell lookup and copy in VBA

I have found VLOOKUP and it does not seem to match all of the criteria I need to perform.
The following is what has stopped me at this time. I would appreciate any assistance.
in excel, I need to match a value from a specific cell in spreadsheet A, column B, with a range of values in spreadsheet B, column C. Then in the row that the value in spreadsheet B is found, I need to obtain the value for the cell in column P and copy it into spreadsheet A column N.
Thank you,
While VLOOKUP has its uses I would always recommend using the INDEX function instead as you are not limited by using the leftmost column.
I think the type of formula you are looking for is (to be put in column N of spreadsheet A):
=INDEX('[Spreadsheet B]Sheet1'!P:P,MATCH(B1,'[Spreadsheet B]Sheet1'!C:C,0))
This would match the specific cell of B1 in Spreadsheet A with a value in column C in Spreadsheet B and then give provide the value in column P of the corresponding row. Obviously you should change out 'Spreadsheet B' with the name of your workbook and 'Sheet1' for the name of the worksheet in Spreadsheet B.

Find the difference between data in 2 columns in Excel

I have 2 sets of data. I put it in Excel e.g. column A and column B. Now I want to know which data from B is part of column A. I run this formula =IF(COUNTIF($A$1:$A$327238,B1)>0,"Exist", "Nope")
Then I 'filter it and look only 'Exist'. Based on that I know that all data in B that has label 'Exist' is part of column A
Now I want to know opposite i.e. which data from A are part of B. For that reason I use the same formula but I replace the data in columns i.e. data from B now in A and vice versa.
Then I randomly verify results.
For case 1 it looks it works fine but for second case it looks it's not accurate.
My assumption: should it work in case 2 as well ( maybe I just was not very accurate in some way ) and I should expect it to work?
Thanks
In cell C1 (assuming your data starts from 1st row) type the following =IF(A2=B2,"equal","no"), and then populate the same formula to the last row where there is still data, so that for row N, your formula in column C is =IF(AN=BN,"equal","no"). After that you will just need to count the cells with value "no" to know the differences. Sorry if I didn't get the question correctly.
Ok, assuming that the two sets of data are in columns A and B (they might be of different sizes), and the last rows of data are L and M respectively, click on D1 and type the following: =IFNA(INDEX(B$1:B$5,MATCH(A1,B$1:B$5,0),1),"Unique"). Drag down to apply this formula on D1 - DL. That's it, you have the duplicate elements. Since the duplicate elements are the same in both columns - A and B, you don't need to repeat this for column B. Note, that for all the unique elements the corresponding rows of column D have the word "Unique", so if you want the unique elements, you can just get the elements from A with the mentioned row numbers:
Just select any column's first row cell and type the following formula: =IF(D1="Unique",INDEX(A$1:A$L,ROW(D1)),"Duplicate").

Count values in groups

I have a table with student IDs separated in groups. I need a handy way to count the total number of students in each group and populate it after the last row of each group (marked with ??)
Currently I just enter =COUNT() and then manually figure out the top and bottom borders of the range for each group. Not convenient at all.
I was thinking that a possible solution could be one of the following:
A some kind of pivot table permutation. I failed on this one.
Excel Data->Outline->Subtotals functions. Again, fail. It keeps creating new rows in my table.
A universal formula that can be pasted into each ?? cell. Not the most graceful solution, but still would do.
A macro. As a last remedy if nothing else works.
The following steps will calculate the subtotals while preserving the structuring and formatting of your worksheet.
Put this formula in cell C1 and copy the formula down the column:
=IF(NOT(ISERROR(SEARCH("Total",A1))),COUNTA(INDIRECT("B"&MATCH(LEFT(A1,LEN(A1)-7),A:A,0)+1&".B"&(MATCH(A1,A:A,0)+1))),IF(B1="","",B1))
Apply a conditional format to cell C1 with the formula rule =(MOD(ROW(C1),2)=0) and blue fill to match the shading on the other rows. Copy the format down the column using Paste Special Format.
Either hide column B, or copy the values in column C to column B using Paste Special Values and hide Column C. If you decide to copy the values to column B, you won't need to set the conditional formats.
Here is what the formula does:
First, check whether the formula's row is a Total row, by searching the cell in column A of the row for the word "Total," using the SEARCH function.
If the word "Total" is found:
Determine the range in the worksheet of the student IDs for the group for that total row:
a) Identify the rows in which the words "GroupX" and "GroupX Total" are found by using the MATCH function. With that, you know that the IDs for the group are in a range that starts at, say, row x and ends at row y.
b) With the starting and ending row numbers, construct the address range in which the IDs lie, which has to be the string "B" + (row x) + "." + "B" + (row y).
c) Turn the string into a range reference that can actually used in a formula using the INDIRECT function.
Count the number of students in the group using the COUNTA function and the range, and show that as the formula's result.
If the word "Total" is not found
Check whether the cell in column B is empty
a) If it is empty, show a blank as the formula's result
b) if it is not empty, it must be a student ID, so show the ID as the formula's result.
Add a column (I usually add it to the LEFT of the existing matrix) where you enter a formula from row 2 onwards that fills the blanks in the old column A. Then the old matrix including your new column can be used in a pivot.
So Insert a column left of your matrix, this is column A now. Put a header in Cell A1, for example "Group Name1"
Enter the following formula in cell B2 and extend it to the end:
=IF(B2="",A1,B2) This way your blanks will be filled.
Now apply a pivot on this matrix and there you are.
Maybe not the nicest looking solution, but its quick and works well.
If u have table like this
Students id Name of students group ........
then u can use countif/countifs formula

Resources