I have a list of items, expiry date, quantity, and usage. Goal is to find out how much of each item of each expiry date, if any, will need to be written-off as unused before expiring.
Different items may have different number of expiry dates. Assumption is that the shortest expiry dates stocks are used first (EEFO) [so different lines of the same item are linked], and that when stock expires, it cannot be used anymore.
I am assuming a VBA loop macro somehow is the best method. I was reading up and thought that maybe an array would be necessary too but I am a complete newbie at this.
You don't really need VBA for this. You could do this with Excel formulae and it'd be really easy with some helper columns. If you don't want to show the helper columns you could put them on a 2nd hidden sheet and then just show the result on the display sheet. Any VBA you write would essentially do the same thing but with looping etc. might get a bit complicated if you're new to it.
To get these results:
I used these formulae:
I took your figures for item "E" but made up my own for item "D" so I could test changing the item in column A to make sure it worked.
Like I said in a comment, make sure that your expiry dates per item are sorted ascending.
(e.g. sort on expiry date, then items to get this table to work)
Another word of advice, if this stuff is happening on a grand scale then a SQL database would be good, if you have MS ACCESS you could try putting the data in there and re-asking the question.
Related
I'm writing a spreadsheet to track performance through time. As there is several iterations for each dates, it was way better for the eye to show each ones in a table and not everything in just one row. The result is a sheet where for each dates there is a table :
This is a reduced version for this present post, there is more columns and more rows for each dates (otherwise, yes, it could have been on one row only).
Each time we'll make a new evaluation, we'll copy a table in this FullData sheet, put it after the last one, and change the date.
As this sheet is very dense and because I'll later create graph of some indicators on time, I want to create a simplified sheet (Overview) that "receives" the data from the previous FullData sheet. The aimed table looks like this :
As you can see, the goal is to sum up each tables of the FullData sheet, in one row in the Overview sheet.
Ideally, it will automatically appear as a new line to the Overview, if there is a way to make it "detect" a new table/date.
I'm quite unskilled at spreadsheets. I get the mechanic but I'm super ignorant about the different functions. I explored around INDEX, Dynamic Cross Tables (I translate from french, not sure it's exactly the english name) and have the big intuition Named Ranges are in play here.
As the tables will always have the same size, there is maybe a way to indicate the date cell with a constant increment formula?
I get this isn't the only question here, It's my first post and feel free to tell me if it's not narrow enough, I just wanted to provide a wide view on the situation.
To sum up the questions I identify (for what I discover with spreadsheets, there is always a new question I didn't think about)
How to select the informations I want from the FullData sheet to the Overview one, in a way that will be easy to repeat each time I create a new table/date?
Is this possible with the "basic" functions, avoiding macro/script (it would be another world to me)?
Can automatic the process can be? Spectrum of automation : I just copy a new table with a new date and the selected data appear in the Overview <> I tweak the copied table each time, by naming it and/or adapt the formulas of it's original version.
Thanks for your reading of my non-technical, non-totally english prose.
try:
=QUERY({FullData!B2:B\
{QUERY(FullData!L2:Q; "offset 2"; 0);
{""\""\""\""\""\"";""\""\""\""\""\""}}\
{QUERY(FullData!L2:Q; "offset 3"; 0);
{""\""\""\""\""\"";""\""\""\""\""\"";""\""\""\""\""\""}}};
"where Col1 is not null and not Col1 matches 'Amount|Duration'"; 0)
i'm messing about with powerapps and attempting to build a small app that adds all my exams into my school's calendar as this will save me (and other students) a lot of time.
at the moment i have already managed to get all the required data from the excel file that contains all exams with their dates, locations, times and much more irrelevant information. this data is filtered to only include the exams for me (and technically all other engineering students if i make it public)
i've stored it in a collection and have no problem using it.
the issue is the outlook/office365 connector as im not shure it can do what i'd like it to do.
Office365.V2CalendarPostItem(calendarSelect.Selected,test.'Cursus Omschrijving',test.'Datum/Date',test.Tot,{Location:test.'Locatie/Location'})
i've put up a calendar selection dropdown thing as i dont know if all calendars are the same so you can select the right one. calendarSelect.Selected is the result of that. test.'Cursus Omschrijving' is the title of the exam. the date bit is, well, the date and start time, and test.Totis the end time.
the issue is Office365.V2CalendarPostItem expects only one item at a time really. powerapps complains about it recieving a table and not text or a date as it expects.
Do any of you know if it is even possible to do what im planning(bulk adding calendar items) or is powerapps not capable of this and i need to switch over to a more powerful language?
This is my first question on StackOverflow so apologies if there is not enough appropriate information.
Rather than having four different tables that I try to position 'just so' so that they look like one table, I was hoping to have all of my data in one visible table and hide the rest.
To do this I was trying to use LookupSet/Lookup with Running Value (I need a cumulative figure for each fortnight from a start date).
I have used the following code which supplies me with figures in the table - however the figures seem to be nearly double what they actually are.
=Lookup(Fields!StartFortnightDate.Value, Fields!StartFortnightDate.Value,
Fields!RowIdentifier.Value, "KPI004")
Is it possible to use Lookup with RunningValue? It won't let me use ReportItems either its obviously only pulling from the first box and therefore is just repeating the first figure again and again.
Any help, guidance, or even a simple "it's not possible" would be appreciated.
Edited to add more information as suggested:
It's difficult to add example data without worrying about data protection etc.
Report design is currently:
ReportDesign
Each table has it's own dataset - I'm trying to get them all into one table.
Lets say the first dataset is number of cars sold in each fortnight.
The second dataset (table) is number of meetings held.
The third dataset is number of days weather was sunny/cloudy/rainy etc.
(This obviously isn't what the datasets are, but I'm trying to show that they don't actually relate to each other that much and therefore can't all be in the same script)
All datasets have a table of the fortnightly dates within that quarter, my hope was to get one table that showed the cumulative figures of each item even though they're not in the same dataset - the tables are all grouped by the StartOfFortnightDate.
The script =RunningValue(Fields!NumberOfFordCarsSold.Value, Count, Nothing) and similar works fine in the separate tables, however if I add a row to the top table and try to use RunningValue with Lookup it doesn't work.
When I used the script mentioned at the top (Lookup script) I get inflated figures (top row of this image) compared to the expected figures (bottom row of the image): IncorrectAndCorrectFigures
Apologies if this doesn't make sense, it's likely that my complete confusion in trying to find the answer is coming across in the question.
If the resulting datasets are all similar then why can you not combine them?
From the output they seem to be just Indicator & Date.
Add an extra column to indicate which set of data each row belongs to (Cars Meetings etc), this might help with grouping rows in the report.
Okay. I was looking at my physio's spreadsheets for his small, private business today. He uses Excel to keep track of his clients appointments, fees, attendences, medical reports etc. At the moment he has a single sheet where he adds every clients appointment to the list as he goes - there's 3 years of details, one row for every appointment! It's huge and pretty hard to navigate and make sense of when he's extracting information such as fees paid/unpaid, total visits, etc.
I'm a novice to sub-intermediate at Excel, but getting better. What I'm wondering is it possible to set up a "front page" where he can enter a day's details in a single spreadsheet, press an export cell,and then have Excel pass the relevant data to individual sheets for each client. The data on that front page would look for the clients name as a string to find the relevant sheet and drop the information in.
I'm not asking how to do it as such, but rather wondering if this is possible at all!
Thanks
=COUNTIF(Sheet1!RangeToLookThrough, ValueYoureLookingFor)
Put this where you want.
If you want a daily dashboard, you could replicate this to do something like :
=SUMPRODUCT(--(Sheet1!B2:B4000<>""),--(MONTH(Sheet1!B2:B4000)=9))
Feel free to alter this to capture yesterday or whatever date your looking for. I just used an old report to mess with and give you an example.
I have a large table of market values with rows labeled with each asset name and each column representing each month between 2000 and 2014.
The table I have is currently blank and I want to use an index / match function to search for the data corresponding to each date / asset combo in data that was submitted to me. My problem is that this submitted data is slightly inconsistent in how it names assets at different points at time. One year may have an asset called Goldman Sachs Strategic and another year may label the same asset as GS Strategic Income.
I would like to allow for the user of the spreadsheet to type names that are actually equivalent to each other. On a sheet called equivalent names I would like have cell A1 be Goldman Sachs Strategic and B1 to be GS Strategic Income. I was hoping there was a way to make A1:B1 an array that could then be used as a lookup value within my index / match function.
I realize this probably is not the way to approach this problem but I have a very limited dictionary of solutions because I have limited experience coding and using excel. I was hoping someone could point me in the direction of a solution that would actually work because I am assuming inconsistent data is a problem many people have dealt with before. Thanks a lot for any help that you can offer!
I created some random data to test with
I then created the following table on the second worksheet.
The last 5 columns (2010,2011,2012,2013,2014) represent the year to year names. Using these names (which may or may not be blank), we simply use a series of concatenated SUMIF() functions.
Because you didn't provide specific data, I understand that this answer might not fully fit your question, so if there is anything that is incorrect, let me know. Otherwise, I hope this helps.