Macro for sorting through negative profit

Mr_M

New Member
Joined
Aug 17, 2010
Messages
2
Hi guys. I come on here pretty often to find already existing answer to my questions, but I haven't been able to find something similar to what I need today so I dedcided to take some time out of by busy life to join! :).

I know it's generally useful if I upload a copy of what I'm working with, and I will if necessary. I'm just looking more for a "push" in the right direction.

My workbook has 3 sheets. "Sheet A" is a hidden database for merchant productivity. "Sheet B" is a nice and pretty "presentation" page where, in cell "'SheetB'!G4", you can drop a merchant's ID number and a portfolio is created displaying helpful information about a merchant's productivity, profits, losses, average purchase size, ect. This all happens in the area of C1:J33.

Here's where we get to the fun part. What I need is a macro. Sheet3 is an overview, you drop in a list of merchants in !A:A, it shows gross profit. What would be great is if I could have a macro (which I will attach to a button) that when clicks, goes through the gross profits, and when it finds a negative profit in column !B:B, (for our purposes, I'll say there's a negative gross in B16), I need the macro to move to the left, copy the ID in A16, paste into 'Sheet B'!G4, then copy the area 'Sheet B'!C1:J33 and paste into a new sheet on a new workbook.

So the end result would be, if there were 20 negative gross profit merchants out of 100 merchant IDs added to A1:A100, 20 sheets would be in a new workbook with this presentation formatting.

Wow, that's allot, and I understand if it doesn't make sense. But if you can help/point me in the correct direction, that would be great!
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Jerry Sullivan

MrExcel MVP
Joined
Mar 18, 2010
Messages
8,787
Hi Mr. M,

Here is a "push in the right direction" as you requsted.

Start by searching this Board for posts that ask about finding cells based on their values and copying them to another sheet. Generally the solutions will involve using Autofilters.

Good luck!
 

Watch MrExcel Video

Forum statistics

Threads
1,122,371
Messages
5,595,782
Members
414,020
Latest member
Meghdad

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
Top