How to get cells in Excel to move with another specific cell - excel

Good morning! I have a simple spreadsheet for tracking part numbers (and various data related to them). Column B (on "Data" page) automatically brings in all part numbers from another sheet ("Info" sheet). When this "Info" sheet gets updated with new part numbers (sometimes part #'s are removed, sometimes new ones added) the "Data" sheet also updates and sorts in numerical order. For most of the columns in the "Data" sheet, info is updated with a simple VLOOKUP formula. There are some though that are manual entries. The problem I have having is that when a part # moves up or down in column B, certain cells in that same row don't move and that data is now incorrectly attached to a different part #. How do I get the cell in column A to move with it's corresponding part # in column B?

Related

In excel, how can I automate a sheet to be filled based on conditions of another sheet?

Is there a way in excel to copy the contents of one column to another sheet based on particular values in another column.
I have data which looks like this:
Sheet1:
Sheet2:
I would like to copy the column A of sheet 1 directly onto column A of sheet 2, but only if the value in column B is Y.
I have tried used the match function but am not sure how the best way to do this would be. Is there a way for me to achieve this?
My desired output is:
As discussed in the comments, #Waldorf99 was looking to have a second worksheet that would automatically show a filtered list from the first sheet. I can think of a few ways to do this (array formulas or pivot tables come to mind). The problem with mixing dynamic columns with static values is that the static values would become desynced from the dynamic ones.
In the original example, rows may have a blank value in the condition column in sheet one, and then may be assigned a Y or N at a later date. If a Y is assigned to a row in the middle of other rows, the filtered sheet would shift the existing rows down to make room. The static values would stay where they were, and would become desynced. To demonstrate:
If the above image is the original state of sheet 1 and 2...
...adding a y next to x.1.c would result in sheet two shifting columns A and B of row 2 down, but leaves columns C and D behind (as they are static, and not tied into the first two columns in any way).
One thing that may work as you are wanting are filters. You would only have one sheet, with all of the data manually entered. Then you can add filters, and change them to hide rows temporarily when needed.
To add and use filters:
Start with your data all on one sheet...
Highlight your data...
On the Home tab, select "Format as Table" and choose any style...
This turns your data into a table. You can filter by clicking the drop down in a given columns header row, then deselecting the values you want to hide.
The results are a table that only shows the rows with a 'Y'.
The other rows aren't removed, just hidden. You can always reset or change your filters, to configure which rows are visible.
Note: when working with tables, they will auto expand to account for new rows, so long as you work in the row directly under the table (e.g. don't leave blank rows). You can also manually resize the table at any time by clicking and dragging from the bottom right corner of the table.
There are tons of resources of Excel tables online, and it's a pretty useful tool in Excel.
Hope that achieves what you were looking for.

force excel cells to follow position of another cell

i have a two tabs excel, in the first one the user input some data, then in the second tab the first five column are populated with the info from the first tab, the position of these data is relative to the position of the data in the first tab
so for example, if a user populate the first and tenth row in the first tab, then only the first and tenth row of the second tabs are populated.
thing is after the fifth column in the spreadsheet the user can put some more info regarding the data (like comments or other) and those cells are hardcoded by the user, so is someone happen to do a sorting action in the first tab the five columns in the second tab would also change position but not the other column after that, leaving behind the eventual data.
is there a way to force the cells after the fifth column to just "follow" the position of the data in the first five?
In trying to avoid using VBA you can achieve this if you are ok to add some technical columns.
Sheet1:
Change your source in sheet1 to table format (this will make sure formulas are copied down when user add data;
add a technical column (can be hidden, copy paste link from the user input column in sheet 2) e.g. Sheet1!B:B;
Sheet2:
Add 2 columns:
=> user input (unsorted) e.g. col.D, (This is the column that user can edit)
=> user input sorted (users should not edit this column)
Add a tech column (can be hidden) with : MATCH(D3;Sheet1!B:B;0)
Add in the "user input sorted": INDEX(D:D;MATCH(ROW();G:G;0);1)
When the sheet 1 is sorted, the tech column will also be sorted, we then use this info to find back the original comment, define it's new row nr and show it in the sorted col. on sheet 2. This will not work if 2 comments can be exactly the same!
Note!
for the formulas to work, you'll need to change my semicomma's to a comma if you are on a US Excel (I'm on EU).
best of luck,
ceci

Excel formula/VBA that shows only a part of a column of another sheet

What I am trying to do is to show only a part of a column into another sheet through a formula.
Basically I have an Excel file in which I type in work shifts, as you can see on the example. The top of this table contains the date. The first column contains the name of the employee.
If possible I'd like to have the column of a specified date on another sheet (maintaining formatting), so that I can “sort” employees in their exact place without the need of swapping between Sheets.
The “blacked out” part is the one with employees names, the red-highlighted part is the one that should “appear” on the other sheet.

Unique Values in Drop Down List

I have two workbooks, a source file and an output file.
The source file contains information which occupies some drop-down lists in the output file.
For each drop-down list I have two 'names' (in the name manager) linked to it. For instance, the name 'SchemeID' in my output file refers to the same name in my source file. It consists of several rows/columns of data, and that populates my drop-down list.
There are some repeats in the source file (e.g. different names associated with the same number) which are appearing in the drop down lists, and I'd like to get rid of them so the list only displays unique values. Is it possible to do this using data from different workbooks?
The easiest way is oging to be to go to the source workbooks, Data Ribbon -> Remove Duplicates. Anything else will require a couple of in-between data sheets or VBA to do cleanly. If your data doesn't change option this manual method should be fine.
EDIT as you seem restricted from editing the Source File
In a different sheet (let's say Sheet2) you will need a formula which pulls in all of your data from your 2 source Names. To my knowledge there is no clean non-VBA way to combine to Named Ranges, so we will need to do this by dumping the data down to a sheet, and then picking it up again.
There are a lot of ways to do this, but I'm going to pick the one broken down to the most steps; it will be a pretty messy sheet, but you can hide it if you need to, which shouldn't be a huge concern as a non-VBA method will need a data dump sheet anyway.
In Cell D1, we will put the number of rows in SchemeID, as follows:
=ROWS(SchemeID)
In Cell D2, we will put the number of rows in SchemeID2 (which I assume is the name for your second list, which you didn't specify):
=ROWS(SchemeID2)
In column B we will be dumping in the data from both named lists, without sorting or eliminating duplicates. Do this as follows, starting at A1 and dragged down (if you want headers this gets a little trickier, so I will assume no headers).
=IF(ROW()<=$D$1,INDEX(SchemeID,ROW()),INDEX(SchemeID2,ROW()-$D$1)
This says - if the row is not more than the total entries in SchemeID, then pull the value from SchemeID at the current row #. Otherwise, pull the entry from SchemeID2, at the current row# less the total rows in SchemeID (so if we are at row 10, but SchemeID ends at row 4, then row 10 will pull the 6th entry from SchemeID2).
Now in Column A, we will be checking to see which row is a duplicate, as follows starting at A2 [A1 is hardcoded as 1]:
=IF(ISERROR(MATCH(B2,$B$1:B1,0)),A1+1,A1)
This checks to see if there's a duplicate of the current value in column B, in the rows above the current row. If there is, it keeps the same index # as the row above (which will be ignored when we use this as the index key next). If there's no duplicate, it adds 1 to the index number.
In cell D3, put the following formula to track how many unique IDs there are:
=MAX(A:A)
Next, in column C, put your new list, which pulls from column B for as many unique values as there are [drag down]:
=VLOOKUP(ROW(),A:B,0)
This is your new non-duplicate list. To make a clean reference to it, create a new named range with the following formula:
=INDIRECT("'Sheet2!R1C3:R"&'Sheet2!$D$3&"C3", FALSE)
This will simplify to [Assuming 20 rows of data in column C, bsaed on what D3 says]:
='Sheet2!R1C3:R20C3'
Which, in the R1C1 method of referencing, means Sheet2!C1:C20.
This new named range should be what your dropdown lists refer to on your other tab.

Grab data from certain, variable number of rows in another sheet

I have searched and searched for a solution - but then I don't really know where to begin with this one. May not have been the most effective search.
I have a spreadsheet that chronologically lays out tasks with responsible peoples' initials next to them (a leader and a backup). I am to make a new worksheet that displays this data differently and is person-based.
Is there a way to have Excel seek out which rows have given initials (initials are in a cell of their own in the source) - in either the leader or backup cells - and then insert a formula like the below for those rows? This example grabs a bunch of text from different cells and puts it together (AB+CD, this place - doing this) in a different layout I'm using. What I need Excel to do is fill in the row (30, below):
='AUDSCHED-COPY'!I30&"+"&'AUDSCHED-COPY'!J30&", "&'AUDSCHED-COPY'!D30&" - "& 'AUDSCHED-COPY'!E30
I'd like to have a little section for each person, one on top of the other. Will Excel be able to adjust the whole sheet based on the number of times a person's initials occur on the other sheet?
This involves quite a lot of guesswork as to what you want to achieve, but should at least be a start.
Apply your formula to all rows in existing sheet.
Copy all rows, except label row, immediately below existing data.
Move copied part of ColumnJ to a blank column, say Y, (same rows).
Move copied part of ColumnI to a blank column, say Z, (same rows).
Move relevant rows of ColumnsY and Z to ColumnsI and J.
Create pivot table in new sheet from ColumnsI to K of existing
sheet, with labels from ColumnI and ColumnJ for Row Labels.
Sort pivot rows alphabetically.
To add new task, overwrite first copied row, then copy all rows [from immediately below label row to overwritten row] over rows below overwritten row and refresh pivot table.
Not elegant but if this ‘manual’ approach achieves the result you want then you have a basis for a code solution.

Resources