Copying data to another worksheet based on criteria. - VBA

Microsoft Excel 2010 - complete product...
March 7, 2016 at 08:23:43
Specs: Windows 7
Maybe I'm just over thinking this, but I couldn't find anything about it anywhere.

What I'm trying to do is copy a range of cells from a table on one WS, to 1 of 3 tables on another WS based on criteria.

I could just re-work things if there is an easier way to do it.

Source WS: 'February Closings'!
End WS: 'Nylx Pricing'!

'February Closings'!
Table header: B6:L6
Data: B7:L35
Criteria is column G, which is either Dialer, Co-Marketing, or Referral
*I would like to copy Columns B:F Based on column G

B6	C6	D6	E6	F6	G6	H6	I6	J6	K6	L6
X	X	X	X	X	Dialer	X	X	X	X	X
X	X	X	X	X	Co-Marketing	X	X	X	X	X
X	X	X	X	X	Referral	X	X	X	X	X
X	X	X	X	X	Dialer	X	X	X	X	X
X	X	X	X	X	Dialer	X	X	X	X	X
X	X	X	X	X	Co-Marketing	X	X	X	X	X

'Nylx Pricing'!
-Dialer:
Table header: B10:M10
*Will always start here
'February Closings'! copied data would be B:F

-Co-Marketing:
Table Header: B35:M35
*Could change depending on how many Call Center
'February Closings'! copied data would be B:F

-Referral:
Table Header: B46:M46
*Could change depending on how many on above 2 tables
'February Closings'! copied data would be B:F

X:Data copied from 'February Closings'!
Y:Other Data
B10:M10 - Headers

Dialer											
B10	C10	D10	E10	F10	G10	H10	I10	J10	K10	L10	M10
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
											
Co-Marketing											
B35	C35	D35	E35	F35	G35	H35	I35	J35	K35	L35	M35
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
										
Referral											
B45	C45	D45	E45	F45	G45	H45	I45	J45	K45	L45	M45
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y
X	X	X	X	X	Y	Y	Y	Y	Y	Y	Y

message edited by Solomon3y


See More: Copying data to another worksheet based on criteria. - VBA

Report •

#1
March 7, 2016 at 12:09:46
I figured it out

Report •
Related Solutions


Ask Question