How do I transpose a list of data over a range of dates to individual dates in Excel VBA? - excel

Example SSheet
Hello, I have a data analysis problem i'm not sure how to tackle, please see example google sheet. I have a list of data for the cost of products over a date range; The date range is specified by a start and end date column. I need to write a macro which identifies the cost of a specific product for each day in the date range, and match it to a unique product list by day (sheet2). I honestly don't know where to start as my knowledge of VBA is limited, but i do have some familiarity with the language. Would anyone be able to help me figure out a way to tackle this problem? I already have a macro which generates Sheet2, I just need a way to populate it with the information from sheet1. Any help would be enormously appreciated.

Related

Duplicate named range based off of cell value

I am working on updating an Excel spreadsheet for my supervisor and I want to find a way to get a named range from another sheet depending on the day of the week (each named range has the name of a weekday) but I haven't found a way to do this.
So I need the staff list to be duplicated under the weekday heading based on the heading. Any help appreciated, I don't have a huge deal of experience with Excel or VBA.
I'm not quite sure if I understood what you are looking for! If your Excel version has Dynamic Array Formulas then you can try this:

Is there Conditional Formatting or a formula that can copy rows from my main report sheet to different sheets based on multiple criteria?

So, I've tried to troubleshoot and I've Googled everywhere to help me figure this out. I need a formula or formatting to copy rows from my main report sheets to different sheets based on multiple criteria.
Here's an overview of my report page and the different sheets I need rows copied into based on my criteria.
Example #1:
So if Ref: Delivery Appointment Date Late contains 00:00, and Target Delivery (Late) is in the past or equal to the current date, the whole row needs copied to Del. Appt None past Target sheet.
Example #2:
If Ref: Delivery Appointment Date Late contains 00:00, and Target Delivery (Late) is in the future, the whole row needs copied to Del. Appt None sheet.
And basically, I need a formula that I can work with to match criteria for the remaining sheets with similar situations.
Any help would be appreciated. I'm a beginner with Excel, and I've tried everything I've Googled but I can't get anything to work the way I need it to.
=FILTER(Table1,(Table1[Target Delivery (Late)]<=NOW())*(LEN(Table1[Ref: Delivery Appointment Date Late])<>LEN(SUBSTITUTE(Table1[Ref: Delivery Appointment Date Late],"00:00",""))))
The formula above would return the table (I've named it Table1) filtered down to the conditions you listed in example 1. A similar formula could be constructed for all your other conditions.
Also, I only have the snapshot of your data, so it's hard to tell how the dates are being stored. If the Target Delivery (Late) column is stored as text, you might have to wrap that part in a DateValue function.

How to extract data using two Filters in Excel?

I am school student and new to the Forum and I need help with some problems.
I have been lately trying to build a Inventory Sheet in Excel, where there is a table of Partnumber, Responsible Department, Delivered Calendar Week and Product type.
I want to filter the data using two filters, for example: The parts that has been taken by customer on calendar week KW(10).
And I then need to take the total number of this filtered parts to another sheet.
Can anyone help me with this?
There is no need for VBA. You can use a simple formula for this in the example shown below:
=COUNTIFS(Tabelle1[Responsible Department],$F2,Tabelle1[Delivered KW],G$1)
Enter this formula in G2 and copy it to the other cells. Tabelle1 is the name of the formatted table.

Vlookup or Index Match for finding data in a certain date range

I am currently working on a spreadsheet where I need to find corresponding information to a item number if it falls within a certain date. However I am unsure how to tackle this.
I'm new to the website and not sure how to paste my example so I will try to explain.
I have four different locations in which I need to find their oil and water production numbers (which are inputed into a table on a separate tab). I want to be able to lookup this data from the table if they fall within a certain date range. All the data in the "Production Numbers" sheet have dates associated with them.
Thanks. Very vague but please let me know if you need any other information.
Thanks.

Return a value relative to every instance of a search term

I have a spread sheet populated with dates (Months) and revenue figures. The sheet is structured with numerous tables all containing these month-revenue pairings but they are not all in the same columns.
I need to be able to search the whole range of cells for a given month and then each time the month is found I need to look across for the revenue figure (5 cells to the right) and return the answer.
The answer returned needs to give the total figure for all instances of the search term.
VLookup won't work because there are multiple tables and they are not all lined up.
Any advice would be very gratefully received.
Thanks
You should use a VBA script for that, IMHO this is not possible to do in a formula. Here is a rough outline what you need to do:
Define an array of the month names as they appear in you sheet
Iterate this array and for each month name find all cells containing it (this might help)
Iterate all cells of each month and do your calculation based on this cell (find a cell with a certain offset or whatever)
If you cen provide a more specific description of your problem (preferably with example data/images), maybe we can give you a more specific answer.

Resources