+ Reply to Thread
Results 1 to 15 of 15

using vba coding need to prepare the following chart

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    using vba coding need to prepare the following chart

    i have a report card data with names ,roll no. and scores of students. i want to write a program so that this data is set up and the dates where student were not there(represented by n/a) no score is given and should not be there in the report card data.attached the files.
    Please Login or Register  to view this content.
    i have done it like this but it is showing error.please help.
    Attached Files Attached Files
    Last edited by amu; 09-28-2012 at 11:56 AM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: vba code

    I thought
    Please Login or Register  to view this content.
    should be
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: vba code

    [CODE] i did it but still not effective,i want to show the names of students and their scores on a particular date.

  4. #4
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: vba code

    AMU,

    Am not sure what you wnat to happen with this code. Do you want to input a date when prompted and have it generate a list of every students name and score for that date but exclude any students who were absent? If so should this be on a separate sheet or a totally new workbook? Have you any specific formatting for the layout of the report in mind?

  5. #5
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: vba code

    yes , that is what i want .i have the data in excel sheet 1 ,ithe code should run and show only the relevant things as a chart.thank you.

  6. #6
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: vba code

    AMU,

    The attached file has a bit of coding in Module1 which will transfer the names and scores across to Sheet2 but without any N/A's in the final data. this can then be used for a chart of whichever sort you want. It allows for addition of more names of students and scores and can be easily modified to incorporate more test dates.

    report card.xlsm

  7. #7
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: vba code

    thanks but i want it to be precise so that in 1 program i can display the chart.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: using vba coding need to prepare the following chart

    Mowgli,
    Good code! First thing I learned on VBA is to avoid using "Select". Usually, this happens if you have recorded macro. I have removed the select from your code just to make it shorter and tidy. My question is: the code would not work if the user inputs an invalid date. You are assuming that the user will input only the three dates your put in for the code to work.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: using vba coding need to prepare the following chart

    AB33,

    Sorry, I work out in my head each step to take and write it down, hence the "select". Was thinking about this and as opposed to an input box where an invalid date may be entered would a drop down list be a better idea for the user to select the required date?

  10. #10
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: using vba coding need to prepare the following chart

    As an idea though I do not myself how to do it would be for the user to input a valid date based on the date format specified on the format of the date. If the user inputs an invalide date, the sub should either exit, or the user asked again until he puts the right date.

  11. #11
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: using vba coding need to prepare the following chart

    i did it like this
    Please Login or Register  to view this content.
    this is what i am getting but not the desired results.

  12. #12
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: using vba coding need to prepare the following chart

    i did further like thSub report_card()
    Please Login or Register  to view this content.
    but still not getting the desired result.please help.

  13. #13
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: using vba coding need to prepare the following chart

    i am awaiting response.kindly help.

  14. #14
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: using vba coding need to prepare the following chart

    Sorry Amu! I do not mean to ignore you. I just do not know how to do it.

  15. #15
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: using vba coding need to prepare the following chart

    i am stuck with this code.please help.

  16. #16
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: using vba coding need to prepare the following chart

    please help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1