Trying to recreate invoices with multiple types of data

aforte

New Member
Joined
Jan 28, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Here goes,
I'm not a power user and my excel skill set is relatively low, but I've always been able to trudge my way through in Excel and create something that works. Right now, though, I'm at a loss. I've been tasked with recreating a series of invoices. We normally send the data out and an outside company creates the invoices. Now, however, we're attempting to bring that process in house as it will save money. The problem is that the invoices have 5 different types of data on them for 5 different lines of business. I've actually been able to recreate the invoice to some degree, but I'm at a road block in separating out the different lines of business. Every entity is referenced by an account number, but each account number has a different amount of rows of data in each section. This is my problem. Is there a way to adjust the output size by each account so that I don't have numerous empty rows and can that be dynamic? Eventually I will set up a macro to save all of these as individual .pdfs.

To illustrate what I'm talking about, each of these accounts would be created to a separate .pdf based on the account code. I've currently created the template and it is pulling in the proper data, however, it is formatted in a manner that I've left enough space for the largest amount of rows (in this example) the Job column. As you can see that varies by Account code. Account 1234 has the max amount of jobs for the business line one (5) but only 2 jobs for business line two. While Account 1235 has only 2 jobs in business line one but the max (4) in business line two. For Account 1234 I need to get rid of two rows in the area where business line two is displayed. For Account 1235 I need to get rid of two rows in business line one. Any thoughts on how to accomplish this?

Current:
(First Account)
Account code: 1234
Business line one
JobUserAmount Total
1John Doe12
2Jane Doe24
3Bob Doe36
4Jerry Doe12
5Dave Doe48
Business line two
JobDateTimeAmtTotal
11/1/20200900 24
21/2/20201000 48

(Second Account)
Account Code:
1235
Business line two
JobUserAmountTotal
1A Guy24
2A. Nother Guy36
Business line two
JobDateTimeAmtTotal
11/2/2020090012
21/3/2020100024
31/4/2020110036
41/5/2020120048

Desired

(First Account)
Account code: 1234
Business line one
JobUserAmount Total
1John Doe12
2Jane Doe24
3Bob Doe36
4Jerry Doe12
5Dave Doe48
Business line two
JobDateTimeAmtTotal
11/1/20200900 24
21/2/20201000 48

(Second Account)
Account Code:
1235
Business line two
JobUserAmountTotal
1A Guy24
2A. Nother Guy36
Business line two
JobDateTimeAmtTotal
11/2/2020090012
21/3/2020100024
31/4/2020110036
41/5/2020120048

Any help on this would be greatly appreciated.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi Aforte,

I'm not sure of the exact format and I'm guessing you're using formulae to pull in the data and putting a null output where no input data exists.

It appears column D should always have an Amt or Total so you could change your formulae for that column to output a single space. Now run a macro which checks column D and any with a single space gets EntireRow.Hidden = True set. The published PDF will not show those rows.
 
Upvote 0
Hi Aforte,

I'm not sure of the exact format and I'm guessing you're using formulae to pull in the data and putting a null output where no input data exists.

It appears column D should always have an Amt or Total so you could change your formulae for that column to output a single space. Now run a macro which checks column D and any with a single space gets EntireRow.Hidden = True set. The published PDF will not show those rows.
Thanks Toadstool,

That makes sense.

I appreciate the help.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top