Copy cells from one sheet to another based on one criteria

Shamimo

New Member
Joined
Jul 4, 2011
Messages
7
Hi everyone,

I am not a very experience Excel user and not a programmer... so VBA codes are foreign languages to me.. but i would need some help in doing something.

Lets say i have a workbook with 2 sheets : SI and Members
In Sheet SI :
In cell B3 i have the criteria selection based on which i want excel to copy data. The data must be copied in columns A10.

In sheet Members, i have a list of members and based on the criteria selected at line B3, i want excel to copy all members code (Sheet Members Column A) that mach the criteria into sheet SI.
Based on the members code copied in the sheet SI, i will then have a Vlookup function to retrieve the members name and payment amount from the sheet Members and copy it in the cell next to member code in the sheet SI.

Can someone help me on that please ? i dont know if did explain the issue properly...

This excel file will be sent by email to users and they will manualy update regularly the new members in the sheet members but the sheet SI should work the same.

Thanks a lot for you help... if possible.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi Maybe you can modify this code to your needs wasnt sure what you actually wanted...

Code:
[/FONT]
[FONT=Courier New]Sub Test()
    Dim lr As Long
    Dim CustomCritiria As String
    CustomCritiria = Sheets("SI").Range("B3").Value
    lr = Range("A" & Rows.Count).End(xlUp).Row
    Sheets("Members").AutoFilterMode = False
    Sheets("Members").Range("A1:E" & lr).AutoFilter Field:=4, Criteria1:=CustomCritiria
    Sheets("Members").Range("A2:E" & lr).SpecialCells(xlCellTypeVisible).Copy Sheets("SI").Range("C1")
End Sub
 
Upvote 0
Thanks for the macro.. however, i might not be able to use it as the file will be distributed to other persons with different versions of excel.. it can range from xls97 to xls2010...
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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