excel macro to lookup value and insert row below last occurance of the value

wcorley

New Member
Joined
Mar 29, 2010
Messages
4
I have a workbook that contains several tabs for different revenue streams, and an Invoice tab that data is housed in for the rest of the workbook.

The revenue tabs are further broken down by customer, with each seperate invoice listed out with Customer in Column A, Invoice date in column B. See ex.

Bank of America mm/dd/yy
Bank of America mm/dd/yy
Citibank mm/dd/yy
Citibank mm/dd/yy

What I am wanting is a macro (a simple one for each seperate revenue tab) to perform a lookup of the last value entered into the invoice tab, and insert a blank row below the last occurance of the lookup value in one of the revenue tabs. I have 5 tabs and plan on assigning a different shortcut key to each.

I do not need it to place any data, text, etc. into the row, just insert a blank row for a placeholder.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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