Reallocating row data to another row

hutchisd

New Member
Joined
Feb 16, 2009
Messages
49
I know this is going to be kind of complicated to explain but I'll try my best...

I have a list of parts with corresponding cities and data. For example,

PART 1 ATL 2
PART 1 MIA -1
PART 1 NYC -1
PART 2 ATL -4
PART 2 NYC 0
PART 2 MIA 1
PART 2 DAL 1

I want a macro that will look at PART 1 and redistribute the cities that have a positive number to the cities that have a negative number. The goal is to have as few negative numbers as possible. The outcome of the above example should be:

PART 1 ATL 0
PART 1 MIA 0
PART 1 NYC 0
PART 2 ATL -2
PART 2 NYC 0
PART 2 MIA 0
PART 2 DAL 0

Can anyone provide any assistance with this? Thanks!
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Watch MrExcel Video

Forum statistics

Threads
1,109,486
Messages
5,529,152
Members
409,851
Latest member
Ingar
Top