Formula to copy data from worksheet if matching data found or adding to blank line if not

katiedee

New Member
Joined
Dec 18, 2017
Messages
7
I'm stumped. Nothing I've tried is working. Worksheet "Clients FY18" is to keep a log of all units reported by month for the whole fiscal year by client and company. However, the entire workbook is designed by month only. As an example, the staff completes their activity for clients they served for the month of October. Any units they enter for Company One, Company Two or Company Three should transfer over to the "Clients FY18" tab under the October column. However, that tab will already have some preexisting clients, so a formula is needed to search that worksheet to see if there is an existing "ID" and then add that particular October unit to the October column on that row with the matching ID. If there is no ID found, then it needs to add the client name and ID to the next blank row as well as the company name, as indicated on the corresponding company worksheet name. Each month I will copy the previous "Clients FY18" worksheet to a new workbook for the next month. This is to keep a running total of the fiscal year's units by client and company for the staff as they open their workbook each month. However, I know I have to be cognizant of only copying the previous columns up to the current month as the formulas I have on that worksheet are in the total column, so I don't want to paste over it or have a linked workbook.

Not every client will get a unit and each month new clients are being added.

The original workbook has over 20 worksheets with macros and formulas, but this new addition has got me so confused and stumped, so any help is appreciated. I've played around with the VLOOKUP function, but I have no idea where I'm going wrong, so am starting from scratch on this.

I see I am unable to post an attachment, but it is on the other website in the link below.

https://www.excelforum.com/excel-fo...ata-found-or-adding-to-blank-line-if-not.html
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

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