In Excel, creating new rows based on presence of data in columns - excel

I am very new to most of this. I am trying to analyze account attribution a large Excel spreadsheet containing invoice information. My columns A:AF are all the data describing each invoice in our system (name of provider, name of person billed, date received, date billed, etc...). These invoices are assigned to several different GL numbers (up to 22 per invoice). I was given a long string which I was able to break down into columns 4 columns per GL attribution and which I appended to the end of every invoice, where applicable (AG:EL).
Each GL attribution has 4 columns (always in the same order):
GL number
Billed amount before taxes
Amount of tax 1
Amount of tax 2
I would like to see whether there is any way I can have rows created automatically to have one entry per GL attribution instead of one entry per invoice. I would like for the general invoice information (A:AF) to be copied onto the newly created rows. I would really appreciate your help on this as I feel rather lost!
Thank you in advance! :)

I'm not entirely sure what you are trying to accomplish from your description, but if you look into using VBA and make an "if...Then..." statement that will copy and paste the information you want depending on the value of the GL columns that should be a good place for you to start.

Related

How to Subtract a value from the oldest expiration date and move to the next once it hits zero?

I work for an organization and I am working on a way to better organize our part numbers that have expiration dates. I've started off by making an Excel sheet that has the part number multiple times based on the expiration date and then had the matching quantities of that expiration date. What im trying to do is what you always do in life, if something is going to go bad use up the one that will expire first. But now trying to do this in an excel table automatically. This is my Ex: my master log where they will put in the Part#, expiration date, and quantity, this is where most info will be pulled from.
I am now on to taking away our companies forecasted usage of these parts away from these quantities to show an overall usage over the months and pairing the intersecting expiration dates. I’ve got the Usage by using a pivot table to total these part numbers quantities. And I’ve made a chart mapping the overall usage to part quantity forecast with it being flagged if the expiration date interferes with the actual date. This is the forcasting for what we plan to use of each part #
This is me subtracting the usage number from the inventory of those part numbers and it being flagged when it expires.
=IF((IF((VLOOKUP($F60,Expires!$1:$1048576, 10, FALSE))<Sheet1!G$58, "Bad", "Good"))="good", T33, "Expired")
I used this function, my vlookup pulling from my first sheet and pulling the part numbers expiration date and if it is <the date up top (9/1,10/1 etc.) then it will be flagged as expired and wont even show the usage. T33 is simply pulling the fromual from another table which is just quantity- usage. Please lmk if this looks right my vlookup turns out pulls the latest expiration date from the multiple part #s.
But that is with total quantities, not separated based on the part number expiration dates. What I am wondering is how can I make a table like this but subtracts the usage from quantity of the part number that will expire first? Then after that quantity hits zero it takes away the usage from the next one due to expire? But also I want the Numbers to be able to auto populate from the sheet where the user enters the data (master log).
So this is what it will be doing and will look like the table above multiple of the same part number. Whats happening now
But needs to look like this Final table and add the part number to the list and quantity as they are entered in the master log. I was trying to do a Vlookup(MIN and take the part number from the other table based on the lowest expiration date first but I don’t think excel is capable of that, I’m not sure here.
Please help, thank you!

Pivot Table project - Avoid using many INDEX and MATCH functions that make Excel crash

I need some help with an Excel Project that's giving me headaches. I succeeded to achieve everything I wanted but the result is too heavy for Excel and it crashes all the time. I'm over-using the INDEX and MATCH functions on large tables (50 000+ lines) and Excel doesn't like it. I'm looking for a way to do the same thing in a lighter way for Excel.
Here's what I achieved : I created a report that helps me analyzing my employees's performance VS their billing targets. To create such a report, I used a Pivot Table.
That Pivot Table needs this information as its source :
Each sales that every employee made (amount in $ and date)
The hourly rate of each employee (which changes for every period, see TABLE1 below)
The billing target for each employees (which changes for every period, see TABLE1 below)
Here's my setup. I have 3 tables :
TABLE1 (See attached image) - A table where I manually input data for each of my employees (hourly rate and billing target). Their billing target and hourly rate change every period. So, each period has a different line and I indicate the first day of the period and the last day of the period.
TABLE2 (See attached image) - Table that contains sales data exported from another software I use. Each line represents an amount sold by an employee to a customer on a specific date. This table is pretty heavy and contains more than 50 000 lines. Moreover, the last 2 columns of this table use Index and Match functions to get the right hourly rate and the right billing target from TABLE1. That means that each of those 50 000 lines uses the INDEX and MATCH functions twice… This part is too heavy for Excel and I need a workaround.
Moreover, TABLE2 is getting refreshed every few days with new data coming from my other software (an ERP). So the solution I need to find must take that into account and must be permanent (I try to avoid steps that will have to be done everytime I refresh TABLE2 with new data).
TABLE3 - A Pivot Table that uses TABLE2 as its data source. I use the slicer to select the name of an employee and a timeline to specify which months I want to display. Then the Pivot Table shows my employee's statistics grouped by months. The main statistic is the amount of "billed hours" for each employee, which is in reality the amount of sales made by that employee, divided by their hourly rate on a specific date.
My thoughts :
It is absurd that TABLE2 uses that many INDEX and MATCH functions. For example, if Employee1 made 500 sales between 2020-07-01 and 2020-07-31 (the same month, thus the same period, thus the same hourly rate and billing target), there will be 500 different lines that will use INDEX and MATCH to get the same hourly rate and billing target from TABLE1. That leads to a lot of duplicated calculation and a lot of duplicated data.
Would it be possible for a Pivot Table Calculated Field to use INDEX and MATCH in its formula? And would it be lighter for Excel to do so?
Another way would be to add, at the bottom of TABLE2, 12 lines per year (1 for each month) for every employee where I would write their hourly rate and the billing target. That way, the Pivot Table would be able to display an hourly rate and a billing target for each month, for each employee. That solution would work and would be lighter for Excel, but it would create a high risk of making mistakes while manually inputting the data.
I'm open to all suggestions including VBA!
Thank you very much for your precious time!
EDIT : FORMULA
As requested, here's my INDEX AND MATCH formula that is in TABLE2 and gets the hourly rate from TABLE1 :
=INDEX(TAB_Employee_Data[[#All];[Hourly_Rate]];MATCH([#[Date (Cell)]]; IF(TAB_Employee_Data[[#All];[Name]]=[#[Employee(Cell)]];TAB_Employee_Data[[#All];[First day of the period]]);1))
TAB_Employee_Data is the tab that contains "TABLE1".
I translated the names of the fields since all my work is in French.
This formula does the following : it searches the name of an employee in TABLE1 and finds the period which fits the date of a line in TABLE2.
Also, to work properly, I need to sort the lines of TABLE1 in chronological order.
TABLE 1 :
TABLE 2:

turning rows to columns in Excel

I have an excel datasheet with more than 1,000,000 rows and 80 columns. the datasheet contains sales information of a chain store with more than 1700 store nationwide. each store is repeated 52(weeks in a year)* about 30 (products sold in that given week)* 2(two years). I want to convert the rows corresponding to products to columns. I can't do that using transverse because the products sold each week might not be exactly the same as those sold next week. do you have any solutions?
thanks
I just made a very simplified version of that excel file. the problem is that the products sold are not the same each week. there is a limited set of product, but only some of the items are sold each week
https://drive.google.com/open?id=1B2vjIL2hemfQNrCz0X6u_pzi7Euy6IWa3Lj0_HzDXDE
This isn't much of an answer yet - but it either will become one or I'll delete it, depending on the OP's response.
I'm thinking that transverse/transpose is the wrong term for what you're trying to do.
Perhaps you're just trying to better organize/visualize this data, something similar to one of these Pivot Tables:
or
These are just two of the infinite ways you can organize data in a Pivot Table.
Is that similar to what you're trying to do? If so I'll share some more info.
If this quantity of data is going to keep coming your way, way you really need is to start using an Access database to get this under control and be able to report on it properly (and easily, once it's setup).

Formula Saved Search

I have a saved search to display invoices with original amount due, then if any credit memos applied, along with if any discount taken by the customer for terms, and then the actual payments against the invoices. The issues I'm having is when I'm adding new formula column to display the date invoice was paid in full. When I do that, numbers for "Credit Memo Amount" line and "Disc. Taken" are going wonky when I try to add any this new formula column to the saved search. Does anyone have any idea why that is? System seems to be multiplying numbers many times over. Any input is appreciated.
The issue is that as soon as you take one value from the System Information you will now get a row for each of the lines in the System Notes on the Invoice, which is going to affect your SUM columns. To prevent against this you need to add something to your criteria to limit the number of System Notes fields. For example, you could add a System Notes : New Value filter and set it equal to Paid In Full. This should limit it down to one line.

Excel - Identifying when excluded codes are billed together

Background: I work in healthcare, and the proprietary software my company uses has not quite caught up with the new ICD-10 regulations.
I can export a list of all patients and all ICD-10 codes billed for each patient to Excel. The patient names are in one column, the billing codes are in another column.
Certain ICD-10 codes cannot be billed together for the same patient, ex.: if code A and code B are billed for Mary Smith, the claim will be denied. I've created a list in a different spreadsheet with two columns of codes which is over 20k rows long.
I need to be able to identify if any of the patients in the first spreadsheet have excluded codes billed together.
I am currently using the following formula:
=IF(COUNTIFS(COLUMN WITH PATIENT NAMES,FIRST CELL WITH PATIENT NAME,COLUMN WITH BILLING CODE,VLOOKUP(FIRST CELL WITH BILLING CODE,TABLE WITH EXCEPTIONS,2,FALSE))>0,"Code Error","")
This formula worked fine when I tested it with just a few excluded combinations, but it does not work with the full list of exceptions.
I'm thinking I might need an array formula of some sort, but I haven't really worked with those.
Any thoughts?
EDIT: Here's a picture of what I'm working with -
Excel Data Screenshot
A PivotTable (people for Rows, ICD-10 codes for Columns, Count of people for Values) is, in theory, a way to create a matrix to which say Conditional Formatting rules could be applied to identify where clashes exist. However whether viable for this OP is not clear to me and I doubt will be clarified.

Resources