Input data (a part of a kolom) from a different file with the same date in the kolom - vba

Is it possible to import data from a column in an different file with the same date in the column.
On one sheet i have 7 dates created in different columns with
15-09-15 16-09-15 17-09-15 18-09-15 19-09-15 20-09-15 21-09-15
O
M
N
Now will i show data from cells from a column from a different file with the same date as a cell in the kolom where will be paste the data.

I have found the solution with a formule and not with a macro.
With using the formule HLOOKUP() i have the right result.

Related

Find number of rows in an already filtered Column A in Excel

I have got an Excel spreadsheet. This spreadsheet has just one tab in it. The Tab name is dynamic in nature and changes every week also the number of rows.
I have column A filtered already with a VBA macro. A1 has the header.
Now, I wanna find how many rows are there in this already filtered column A.
I am looking for any VBA function.
I have tried using Subtotal function.
=Subtotal(103,A2:A1345)
But I don't know the end range. As of now the end range is A1345. It will change every time in future if the new rows are added.
I tried multiple things but those did not work. I am quite new to VBA.
If A1 will never be blank, you could use (in a column other than A)
=Subtotal(103,A:A)-1.
Or, if there will be data below your table not to be counted, then format your table as a Table and use structured references (and this formula could go into column A)
=SUBTOTAL(103,Table1[column_header])
You can put the formula in column A if you use another column's last populated cell as the demarcation point.
If column B contains numbers then,
=subtotal(103, a2:index(a:a, match(1e99, b:b)))
If column B contains text then,
=subtotal(103, a2:index(a:a, match("zzz", b:b)))

Adding a row between cell with the same value using VBA code

Im new in VBA and want to know how can i format my table in such a way that each name in Column one do only have 1 row in between.
Some of them do have more than 1 row in between and some of them doesn't have. I just need to format then in such a way where every name on column A has 1 blank row in between. Any help would be appreciated!
Please note that i have thousands of data so manual will not work.
also i tried doing the filtering and convert them into single block. the problem with single block is that my column c do have more than 1 information which is connected to column a, .
here is an example.enter image description here

How do I transfer over the data and format it the way I want?

I have two sheets on my Excel: Worksheet (No data but have proper headings) and Report 1 (Consists of the original data and headings)
Right now I want to transfer the data from Report 1 to Worksheet but when I transfer over, I need the data from Report 1 column M, N and O to be transferred to column B in Worksheet. The data in column M, N and O should be separated with a '-'.
All this should be done with Excel Macros but I do not know how.
Okay, I have solved this problem after some tips were given.
Apparently, I just recorded the Macro and used the CONCATENATE formula, putting a "-" in between and " " for spacing.

Index and Match Excel

I'm creating a vacation tracker in Excel. The first sheet pulls the data from SharePoint which has Start Date, End Date and a Date Difference calculation.
Sheet1
A2=12/16/2015
B2=12/20/2015
C2=5
The second sheet is the visualization of the data. It starts with cell B1 and goes out for 90 days. Is is a word representation of the date. Here is the formula I'm using =UPPER(TEXT(B2,"DDD"))
Sheet2
B1=WED
C1=THU
D1=FRI
E1=SAT
F1=SUN
The next row always B2 has a formula which is always today's date. From there I add one date to increment the dates out to 90 days. B2=Today() and the other cells =B2+1 and so forth
B2=16
C2=17
D2=18
E2=19
F2=20
The problem I'm running to is that our boss can have 3 calendar entries consisting of different dates. So when I perform a SharePoint pull I have 3 different rows of vacation dates. I'm experimenting with an Index and Match example, however the data match it is placed in a new row. How do I place the data on the same row?
I'm not convinced this has much to do with VBA. Seems enough detail of final design but rather light on the data gathering process. However when I perform a SharePoint pull I have 3 different rows of vacation dates hints at a use for Subtotal. Three rows may be 'converted' into one:
where the unshaded part (some cells with Xs) is assumed to be a representation of the current SharePoint data extract. Subtotal is able to add the rows shown lightly filled, which might then be used to =VLOOKUP("Boss"&" Count",A:F,n,0) where n represent the choice of column label.

Macro or method to pivot data in Excel?

I am looking for a way to dynamically pivot data in an Excel sheet to put the data in a universal format no matter how wide the data set is.
For example: I want to be able to take a spreadsheet that could have 5 columns, 30 columns, or x number of columns to make it pivot to a universal format that is only three columns wide.
Here is a sample of how the original data could look:
I want it to look like this:
Is there a way to do it, either by macro or using any other Excel functions?
Assumes labels/data is in Sheet1 starting A1.
Insert a new ColumnA.
For Excel 2003: Activate any cell in your summary table and choose Data - PivotTable and PivotChart Report:
For later versions access the Wizard with Alt+D, P:
Select Multiple consolidation ranges and PivotTable and click Next >.
In “Step 2a of 3”, choose I will create the page fields and click Next >.
In “Step 2b of 3” (not shown in the modal!) specify your summary table range in the Range: field (A2:E6 for the sample data) and click Add, then Next >.
In “Step 3 of 3”, select a location for the PivotTable (the existing sheet should serve, as the PT is only required temporarily):
Click Finish to create the PivotTable:
Drill down (ie double-click) on the intersect of the Grand Totals (here Cell L4 or 16):
The PT may now be deleted.
In A2 of Table:
="Summary"&RIGHT(B2)
Convert the resulting Table into a conventional array of cells by selecting Table in the Quick Menu (right-click in the Table) and Convert to Range.
In a spare column starting in Row2 series fill integers down, from 1 to however many rows of data you started with (4, in the example). Then series fill that series to suit.
Sort sheet by that (spare) column, Smallest to Largest, with My data has headers checked.
Delete Row1 and spare column and hopefully you will end up with: