If Cell = X, Then Copy Some Cells Into A New Sheet

tuytuy

Board Regular
Joined
Mar 28, 2013
Messages
75
Hi,

Sheet : Section_14
[TABLE="width: 2456"]
<tbody>[TR]
[TD]Month[/TD]
[TD]GSM number[/TD]
[TD]Group name[/TD]
[TD]Subgroup name[/TD]
[TD]Name GSM number[/TD]
[TD]User ref1[/TD]
[TD]User Ref2[/TD]
[TD]Call date[/TD]
[TD]Call time[/TD]
[TD]Total volume (KB)[/TD]
[TD]Service[/TD]
[TD]Zone/Country/Operator[/TD]
[TD]Tariff[/TD]
[TD]Type[/TD]
[TD]Supplementary services[/TD]
[TD]Usage amount[/TD]
[TD]Currency[/TD]
[TD]Account number[/TD]
[TD]Discount Indicator[/TD]
[/TR]
[TR]
[TD="align: right"]Jan-13[/TD]
[TD]0470/132024[/TD]
[TD]Unfiled - Niet toegekend - Non attribué[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]18-Dec-12[/TD]
[TD="align: right"]15:48:58[/TD]
[TD="align: right"]893[/TD]
[TD]Mobile Internet[/TD]
[TD][/TD]
[TD]Réduit[/TD]
[TD]GPRS national[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD]EUR[/TD]
[TD="align: right"]10736059[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD="align: right"]Jan-13[/TD]
[TD]0470/132024[/TD]
[TD]Unfiled - Niet toegekend - Non attribué[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]22-Dec-12[/TD]
[TD="align: right"]11:32:23[/TD]
[TD="align: right"]313[/TD]
[TD]Mobile Internet[/TD]
[TD][/TD]
[TD]Réduit[/TD]
[TD]GPRS national[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD]EUR[/TD]
[TD="align: right"]10736059[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD="align: right"]Jan-13[/TD]
[TD]0470/132024[/TD]
[TD]Unfiled - Niet toegekend - Non attribué[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]19-Dec-12[/TD]
[TD="align: right"]03:47:57[/TD]
[TD="align: right"]2368[/TD]
[TD]Mobile Internet[/TD]
[TD][/TD]
[TD]Réduit[/TD]
[TD]GPRS national[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD]EUR[/TD]
[TD="align: right"]10736059[/TD]
[TD]N[/TD]
[/TR]
</tbody>[/TABLE]
Sheet : Section_6
[TABLE="width: 2011"]
<tbody>[TR]
[TD]GSM number[/TD]
[TD]Group name[/TD]
[TD]Subgroup name[/TD]
[TD]Name GSM number[/TD]
[TD]User ref1[/TD]
[TD]User Ref2[/TD]
[TD]IMEI[/TD]
[TD]SIM Card Number[/TD]
[TD]Handset Brand[/TD]
[TD]Handset Type[/TD]
[TD]Account number[/TD]
[/TR]
[TR]
[TD]0470/132024[/TD]
[TD]Unfiled - Niet toegekend - Non attribué[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]1.27E+13[/TD]
[TD="align: right"]2.10E+12[/TD]
[TD]Apple[/TD]
[TD]iPhone 4[/TD]
[TD="align: right"]10736059[/TD]
[/TR]
[TR]
[TD]0470/200128[/TD]
[TD]Unfiled - Niet toegekend - Non attribué[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3.54E+14[/TD]
[TD="align: right"]2.10E+12[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]25054440[/TD]
[/TR]
[TR]
[TD]0470/201029[/TD]
[TD]Unfiled - Niet toegekend - Non attribué[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3.54E+14[/TD]
[TD="align: right"]2.10E+12[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]25056030[/TD]
[/TR]
</tbody>[/TABLE]
Hi i was trying to write a vba code that would lookup up in the column "Service" if the value was "BlackBerry usage", if yes copy the "GSM number" into a new sheet called "BlackBerry".
And then using this number copy the "Account Number" in the sheet Section_6 to "BlackBerry" in column B.
 
please upload a small sample file on a share site then paste the link here, including desired result
 
Upvote 0

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