refresh static columns in excel along with the dynamic columns - vba

I am working on two spread sheets say A and B, the sheet A has data that is directly being pulled from the database using a sql query in the excel connection. It has real time vendor data and keeps changing as and when we refresh the sheet.
I have another sheet B, which is pulling the data from sheet A using the vlookup formulas, in addition to the vendor data it has another static column named "notes". We add some text into the notes column for each vendor.
My problem is, whenever sheet A refreshes, the data in sheet B changes automatically but static notes column doesn't change, as the data changes the notes column is being mapped to the incorrect vendors. Is there a way we can sync the dynamically changing columns and static columns ? I want my notes column to be correctly mapped to the vendors.
I am using excel 2010 version, thanks for your help!
Cheers,

You can make an extra sheet with only the names of the vendors (by using something like =IF(COUNTIF(Sheet1!A$1:Sheet1!A1,Sheet1!A1)=1,Sheet1!A1,"") I've used sheet1 as sheet with the dynamic data. This way you select every vendor only once. Now you can write notes in cell B.
Then in your static data sheet use something like =VLOOKUP(A1,Sheet2!A$1:B18,2,FALSE) so that you find your notes by the corresponding vendor. (Sheet2 is my list of vendors with notes, cell A is the name of the vendor, B are the notes).
Does this answer your question?

Related

Can I copy an ENTIRE Excel sheet and paste to another Excel spreadsheet using Power Automate. (Sharepoint)

I am working from SharePoint.
I would like to COPY AN ENTIRE Excel Sheet-A from Spreadsheet A and Paste it into another Sheet, Sheet-B on Spreadsheet B using Microsoft Power Automate.
Some important things to note:
Sheet-A does not have column names (I know).
There are no Key values or Key Columns. Just random information.
Is there a way to go about this?
Unfortunately PowerAutomate really wants you to have your information in a table if you want to move or manipulate the data and wouldn't it be so useful to have a "Duplicate Sheet" function and copy n paste of individual cells.
If your sheet with the random data happened to be in a single large table, then this may work by apply to each item when navigating the underlying table.

generate a hyperlink in sheet linking to matched data found in a different sheet

I have two different sheets in a workbook with data, all of this data is organized by Site ID's. What I want to do is use these site ID's to create a hyperlink in one of the data sheets that when clicked takes the user to the corresponding Site ID in the other sheet. The sheet name where I want to write the hyperlinks to is called "Report_Manual" and I want to write hyperlinks down every row down the first column. The sheet that I am hyperlinking to is called "Data". The premise Ids are located in column C for sheet "Report_Manual" and column K in sheet "Data". Below is an a ttempt of what I was trying to generate in excel for a single cell formula however the issue I ran into for this formula is that the Premise ID's in sheet "data" are variant data type while the Premise ID's in sheet "Report Manual" are integer data type. This makes even a simple formula like the one below not get any matches as the data types being matched aren't the same.
=HYPERLINK("#"&CELL("address",INDEX(Data!K3:K580001,MATCH(C3,Data!K3:K580001,0))),C3)
If anyone has any idea of a macro to solve this issue that would be extremely helpful.
If the IDs in "Data" are text, try changing your match lookup value to text:
=HYPERLINK("#"&CELL("address",INDEX(Data!K3:K580001,MATCH(TEXT(C3,0),Data!K3:K580001,0))),C3)

Look for a word of column 1 and then search that word in another column of another excel sheet and use the adjacent information to fill the cell

I am trying to organize the data into one sheet. I am looking for a way through which I will be able to extract the potential failure mode from 2nd sheet to the first sheet. The key point is that the potential failure mode should match with its respective component. So the list of components is mentioned. A way through which Potential failure modes of that respective component is detected in another excel sheet and the information which is available in the adjacent column to be extracted on the first sheet.
Your problem is going to be solved with the function =VLOOKUP
Since you are hiding your column and sheet names, I am making some assumptions (assuming the first pic is called Sheet2 PAF is on column B and PFM is on column C). Try on Sheet1!D3 the following formula
=VLOOKUP(A3,Sheet2!B:C,2)
and it will fill in the FPM if a match of Sheet1!A3 is found in Sheet2!B column. You may want further reference
https://support.office.com/en-us/article/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1

Splitting data between worksheets depending on status of Column A

I have been asked to create a database of volunteers in Excel. The main worksheet (called Data) holds all the information – names, addresses, numbers, reference checks, placements, supervisors, etc. What I am trying to achieve is for the relevant information to be moved from one worksheet to another when the status of the person changes.
There would be 5 categories which the volunteers would fall under (column A labelled ‘Status’)
PROCESSING
ACTIVE
ON HOLD
BARRED
STOPPED/RETIRED
What I want to get is a live database so the information would appear on a relevant worksheet whenever the status on the main spreadsheet changes , but I only want some information to show depending on the category…
Each Worksheet would contain columns A-F from the ‘Data’ worksheet and in addition:
Processing would contain columns X-AE
Active: AF-AW
On Hold: AZ-BC
Barred: AX-AY
Stopped/Retired:- BD-BH
I have searched and searched again but I know nothing about Macros (and my IT department is unable to help) So my question is – is this doable and if so is anyone able to help me?
I hope I am making sense and if not I can email across the dummy database with some made up names to show what it is I am trying to create
You can do this using array formulae. This link shows a simple example which provides the basic formula (explained in detail in the linked article)
=INDEX(range,SMALL(IF(col=value,ROW(range)),ROW(1:1)),COLUMN(A2))
Where range is the range of all your data from your main worksheet and value is the value you want to screen for (this changes for each of your sheets) and col is the column on your main sheet that you want to check the values of. Note it is an array forumla so you have to press control+shift+enter after typing in the formula as explained at the bottom of the link.
You will notice that I have changed the formula to say COLUMN(A2) instead of 2. This is so that you can drag the formula across the columns as well as down the rows. You might need to make this COLUMN(A2)-x where x is an offset because your data don't start in column A.
Note that the same applies for the ROW(1:1) part, if your range doesn't start in row 1 then you will need to offset this by some value as well (i.e. something like ROW(1:1)-y)

Dynamic Length Excel Tables with Formatting Driven from Dynamic Source Tables

My current setup:
Users need to create reports in Excel which can contain various components like tables, charts etc. These report components are driven off large source tables which are provided to the workbook via a web service. Each source table lives on its own worksheet and the report components live on a separate sheet called "front_sheet".
A greatly simplified example is as follows:
On "input_sheet_1" there is a table which looks like so
The user would then like to create two tables for the report (on "front_sheet") which reference the table on input_sheet_1, that look like this:
These "output" tables contain columns which aren't on the source table (Total Spend) but they may contain more columns such as "Price in euros" where the "price" column is multiplied by some constant.
The table rows are also colour coordinated by their Category. Also there is a "Total" at the bottom of the output tables.
This is easy to do when the input table is static. However I do not know how to deal with this when the input table has a variable number of rows i.e. each time the workbook is refreshed the basket will have different numbers of different items.
Does anyone know how I can achieve this? A requirement is that the user setting up the report does not have to write any VBA at all.
Thanks for taking the time to read this.