Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Visual Basic Excel Question

Options
  • 19-03-2012 7:01pm
    #1
    Registered Users Posts: 42


    Hi I wonder if someone can give me some advice on using Visual Basic in Excel please. I want to use a list file to update an excel table - and wondered if this can be done using some referencing.

    The list would be something like

    A 10 Jan
    A 20 Nov
    B 10 Feb
    C 25 sept
    A 12 Jan

    This sort of list would add to the following table results for the appropriate months - under the Qty row.

    Cant this be done in Visual Basic please and which formulas should I read up on.

    Thanks in advance
    Liam


    Table Soorry cant do tables here - but each "space" indicates a new column

    Jan Feb Mar Apr May
    A Rate 1 2 4 6 5
    A Qty 0 0 0 0 0
    B Rate 3 5 6 2 1
    B Qty 1 2 0 0 0


Comments

  • Moderators, Technology & Internet Moderators Posts: 1,334 Mod ✭✭✭✭croo


    Can yo not just import the file into excel then create a pivot table to get the summary?


  • Registered Users Posts: 42 liamg67


    liamg67 wrote: »
    Hi I wonder if someone can give me some advice on using Visual Basic in Excel please. I want to use a list file to update an excel table - and wondered if this can be done using some referencing.

    The list would be something like

    A 10 Jan
    A 20 Nov
    B 10 Feb
    C 25 sept
    A 12 Jan

    This sort of list would add to the following table results for the appropriate months - under the Qty row.

    Cant this be done in Visual Basic please and which formulas should I read up on.

    Thanks in advance
    Liam


    Table attachedexample.jpg


  • Registered Users Posts: 42 liamg67


    croo wrote: »
    Can yo not just import the file into excel then create a pivot table to get the summary?

    Hey thanks for the reply - but I have tried to simplify the request. Basically I need an excel application that will open a data file - add changes from a second file and then output to the original data file. Pivot tables would not work in this instance.


  • Registered Users Posts: 2,781 ✭✭✭amen


    Yes you can do this. Look at the File Object.

    You will need to make sure the data is in the same place in the file each month.

    Silly question but where is the data coming from ? Could this not be done at source?


  • Registered Users Posts: 42 liamg67


    amen wrote: »
    Yes you can do this. Look at the File Object.

    You will need to make sure the data is in the same place in the file each month.

    Silly question but where is the data coming from ? Could this not be done at source?

    I will take a look at this thanks - unfortunately this can not be done at source- it is used in an app that I use in work where normally I have to do manual edits to a csv file and then reupload to this app. I am hoping to take the manual part out of this process and could figure this out in an ASP environment and just reading up on visual basic / macros for excel.

    Will look up file object and see if this helps - cheers!


  • Advertisement
  • Closed Accounts Posts: 2,663 ✭✭✭Cork24


    Access is what you should be Using here, inside Access you can program VB and VB.NET


Advertisement