1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

    Yours,
    Chandoo
  2. Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  3. When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Transfer data from one sheet to another based on cell criteria

Discussion in 'VBA Macros' started by mayhem, Feb 12, 2019.

  1. mayhem

    mayhem New Member

    Messages:
    23
    Greetings

    I have 2 sheets and need to transfer the Students Taken in 2018 information from SiteTotals.csv sheet into Schools for CRM matching the schools.

    Please help, as I', unsure what is the simplest way to achieve this without manually copying each cell and pasting when working with a sheet of 3000 schools.

    Thank you

    Attached Files:

  2. Peter Bartholomew

    Peter Bartholomew Well-Known Member

    Messages:
    647
    I would try Power Query for this purpose.

    Open a new Excel document and first open a connection to the xlsx file. Then do the same with the text file, saving each as a connection only within the new document.

    The key step is a merge query as a left outer join based on the school names (the unique school number would be better but one doesn't seem to exist within the files) which will bring in the student number data as a new column. Expand the column to extract the numbers you need and either replace the original numbers column or add the update to the original as appropriate.

    Attached Files:

    AlanSidman and mayhem like this.
  3. mayhem

    mayhem New Member

    Messages:
    23
    Thank you so much Peter, what a simple and effective solution, I'd been racking my brain with iF and VLOOKUP functions to no avail.

    Have a great day
    Peter Bartholomew likes this.

Share This Page