vbeall

New Member
Joined
Apr 28, 2015
Messages
2
I cannot seem to find information about what i need a VBA code to do.
If anyone can help me, that would be greatly appreciated.

I have this spreadsheet to log the customers that recieve service, date of service, amount they owe, and if i recieved payment or not.

(Income sheet)
Date
Customer
Service
Amount
Payment
22-Apr
Blah Blah
Mow
$ 40.00
Cash
22-Apr
Blah Blah
Mow
$ 40.00
22-Apr
Blah Blah
Mow
$ 45.00
22-Apr
Blah Blah
Mow
$ 40.00
23-Apr
Blah Blah
Mow
$ 85.00
Partners

<tbody>
</tbody>

I need to create a formula or code that will automatically insert this information in the invoice sheet when the customers name is inserted in the Bill To section.

(Invoice Sheet)
Bill To:
Blah Blah
55555 Red Oak Dr
Egypt
DESCRIPTION
DATE
QUANTITY
AMOUNT
landscape
20-Apr
1
$ 500.00
TOTAL
$ 500.00

<tbody>
</tbody>



Essentially:
When the customers name is entered, I need it to take the invoice date, which will be the day that the invoice is being prepared, lets say (May 1, 2015), and look for all information from that one customer in the Income sheet from May 1 back 31 days (so the month before the invoice date).
I need it then to return:
1. the date of service in the date column of the invoice sheet
2. the type of service in the description column of the invoice sheet
3. Quantity is always one.
4. the amount from the service in the amount column of the invoice sheet.

I do not want it to return any information that would be green in the payment column of the income sheet being that that means that service has already been paid for.

Is this possible?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,213,527
Messages
6,114,142
Members
448,551
Latest member
Sienna de Souza

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