Import 2 or more columns from Excel into 1 column Access - excel

I have an Excel report that is the output of an opinion tool. In this Excel I have all the responses that the people submit for my quizz, in the questions that are multiple choise answer the tool output those questions like one question per option and only the selected option is the column with data in the Excel. For example, if my quizz is like this:
Q1 Your name:
R1 =
Q2 Options
opt 1
opt 2
opt 3
The Excel report will appear like this
Excel Report
So I want that when I import the Excel to Access it can automatically merge those columns to have only to headers in the Access table: "Q1 Your name:" & "Q2 Options"
Also, for context of the job, I will make some other editions to that imported table and then copy to another Access table (table 2) so even if there is a way to merge those Access columns before copy to the another one I will accept it like, I don't know, insert from this column and if empty insert from that column, I'm not good at doing queries sorry. Only the table 2 will have information, the first table would be like a temporary one so I will daily delete information from that one and preserve the important data en the table 2
Thanks for the support

Simplest way I can see to achieve your goal is to concatenate the three columns; since by the sound of it you will only ever have a value in one column per question per record. You could do this in Excel prior to the import, you could use a calculated field on the table or you could build a query that concatenates all your questions. My suggestion would be Excel since using the =CONCATENATE() function is probably going to be easiest option for you.
If you do import your raw data into Access you will need to assign unique column names, ie Q2_Op1, Q2_Op2, Q2_Op3.
The query syntax to concatenate these fields one would be something like:
SELECT Q1_Name, [Q2_Op1] & [Q2_Op2] & [Q3_Op3] AS Q2_Options
FROM Table1;
Where Q1_Name, Q2_Op1, Q2_Op2, Q3_Op3 are the column names on the imported data table.

Related

Excel data tables: Multiple outputs with only one input column

I am trying to create a data table with multiple outputs across periods, but for the same scenarios.
Is it possible to create that without inserting an extra column between each output column to deliver input for the data table (i.e. input column = index 50-110).
Is this in any way possible? See picture of what I would usually mark to create the data table (this does only cover one period/output though). But if I were to make the scenario for FY23, then I would need to insert a column between FY22 and FY23 where I copy the index 50-110 again. I would like to not have to do that.

Excel Power query merging different workbooks

I can't find the solution for the problem described here.
I have an Excel file with sales data of 2020 and another one with data for 2021, with lots of rows, so if I copy paste one below the other in the other Excel, I can't use pivot data because too many rows, so I want to merge my 2 Excel files in this way:
First table:
Second table:
Desired final table (in Excel):
Is there any way I can do that with power query or something else in Excel?
Note: my table doesn't have just Sales 2020 in 2021, but also other data, but for simplicity I didn't include it there (example: growth 2020, growth 2021)
So if anyone can help me I will appreciate it a lot!
I would start with 2 queries, each one would just read the rows from First table and Second table respectively.
Then I would start a new query by Reference to the First query.
In this Output query I would add a Merge Queries step, matching the first 3 columns from the First and Second queries. I would set the Join Type set to Full Outer Join.
Next in the Expand step I would return all the columns from the Second table.
Finally I would add 3 columns using the Conditional Column option, to create merged versions of Name, Surname and Month. For example:
= if [Name] = null then [Second.Name] else [Name]
Finally I would remove the un-needed columns, rename and re-order the columns if needed.

Pivot table with registers duplicate in 2 row

I have a question about how to summarize a list of data, I attached an image of how the data is presented.
The question is how to determine (summarize) the total of activities per unit considering that a person works in 2 units.
You could define that the person working in A / B does 50% of activities for each unit.
As the list of registers is very extensive the idea is to be able to automate, try with a PivotTable and did not give me result.
Any suggestions would be appreciated (xls, sql, etc).
data
http://ge.tt/381feDj2 -> Excel fILE
Am really not the best of people when it comes to Pivot Tables, but assuming i know what you are asking for.
1) Add one extra column (dummy) and just put 1 in it, this will be used to sum the number of events that the criteria occurs.
2) Select the whole table and then Insert=>Pivot Tables
3) Click Ok
4) Set Rows (fecha); Values (dummy); and the rest to Filters.
Then you can choose to filter your output the way you want. If you want A and A/B you can select multiple in the filter options.

Group data in pivot tables by advanced rules

I was wondering is there any way how to create pivot table in Excel with bit more advanced group by rules?
I am trying to create pivot table that will represent number of records for specified data ranges.
less than 3 days, 3 - 7 days, more than 7 days
I am looking for something simple. I would prefer to do it using Pivot table. Data over which I am trying to create this pivot table are generated on daily basis and input table already contains about 14 different columns. Therefore adding any additional columns is not the way to go
These are imput data
This is, what I am able to achieve
And this is, what I am trying to achieve
Is there any way how to achieve something like this using pivot table?
I am able to create something like this using macro, but it is kinda overkill. I assume there is something like this already implemented in Excel
Add a column in your raw data (with a suitable formula - Band1, Band2, Band3 etc) and use that in COLUMNS for the PivotTable.
Alternatively
Add three Calculated fields
=Aging<3
=AND(Aging>=3,Aging<=7)
=Aging>7
and add the counts for those:

Excel vb project-best practice

I'm not a vb developer neither so familiar with excel. Anyway i have a project to be done using MS Excel (cannot use access).
System is to provide a ratio analysis(ans some other analysis) of companies where data from an annual report need to entered to the system. Then based on several reports data I can derive graphs and all other information.
My question
Now I can store data in a single sheet like using is as as a database. it'll be like
CompanyName Year Data1 Data2 Data3...
Here the CompanyName can be duplicated as many Years data can be entered. If I use this method Each time I derive company data, I have to search for the relevant rows in the worksheet and keep lots of data in an array as I read through those rows and produce the final result.
Or I can use separate worksheet for each company. Then I only have to search for the relevant sheet name and perform operations in that worksheet it self easily.
So what is the best way to do this?
Thanks
Whatever way works. IMO you could create a defined range (or many) and issue SQL against it just like it was Access table(s). I'm for keeping all like data on the same worksheet even for different companies; but that's just my 2 cents. You can create a pivot to separate out the information and slice/dice it however needed
Since someone liked the comment as an answer:...
It might be simpler to do some of this just using formulas and Excel functions. The basic approach would be to keep the data on one sheet and sort it by year within company so that all the years for a company are grouped together. Then use Filter to create a list of unique companies. These steps get repeated each time you add new data.
Then create 2 formulas for each company: the first uses MATCH to find the first row containing the company name and the second uses COUNTIF to find how many rows there are for the company. Then you can use OFFSET(firstrow,ColumnIndex,NumberOfRows,1) (or similar) to get the required range of data for Charts and ratio analysis etc.

Resources