+ Reply to Thread
Results 1 to 6 of 6

Data Validation/Macro/AutoSort

  1. #1
    Registered User
    Join Date
    02-05-2013
    Location
    Birmingham, Uk
    MS-Off Ver
    Excel 2013
    Posts
    45

    Data Validation/Macro/AutoSort

    Hopefully I can explain what I am trying to do without sounding like a melon.

    I export data from a company created file into excel containing various, ever changing information. What I would like to do is automatically calculate the average "Plate Thk" dependant on the "Program No".

    For Example, for rows containing "1" in column "Program No" calculate the average "Plate Thk", and so on for all the other programs.
    I would be able to do this if the imported data stayed the same size using data validation and Vlookup, however, my problem is the amount of data and range of different program numbers means data validation with name tables will not work.

    I must admit I am a novice at Excel, I've only just managed to figure out how to actually use Vlookup!

    I have attached a copy of an example of the data imported. Any help would be appreciated.

    Thanks In Advance
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Data Validation/Macro/AutoSort

    Do you mean?

    =AVERAGEIF(B:B,B2,D:D)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    02-05-2013
    Location
    Birmingham, Uk
    MS-Off Ver
    Excel 2013
    Posts
    45

    Re: Data Validation/Macro/AutoSort

    Basically, yeah. But every time I import new data I would have to keep changing formula, this would be a problem because some data files contain up to 10,000 rows with 25 different program numbers.

    I would like to have a drop down box which would contain only unique program no's (which can change with new data entered) to then calculate the average plate thk based on the program no selected.
    As I said, if the data sizes weren't variable I could do it. I could have 2 entries for program 1 in one data collection and 35 entries for program 1 on another.

  4. #4
    Registered User
    Join Date
    02-05-2013
    Location
    Birmingham, Uk
    MS-Off Ver
    Excel 2013
    Posts
    45

    Re: Data Validation/Macro/AutoSort

    Never mind I've used the AverageIF function with a data validation list based on every program number ill ever use
    Thanks for the Averageif function

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Data Validation/Macro/AutoSort

    So we have to create a unique list. Let's say in AA2 and copy down.

    =IF(MAX($AA$1:$AA1)=MAX($B:$B),"",SMALL($B:$B,1+COUNTIF($B:$B,"<="&N($AA1))))

    Name this as List. Create in L2 a validation list using that name(List).

    Then use this formula.

    =AVERAGEIF(B:B,L2,D:D)

  6. #6
    Registered User
    Join Date
    02-05-2013
    Location
    Birmingham, Uk
    MS-Off Ver
    Excel 2013
    Posts
    45

    Re: Data Validation/Macro/AutoSort

    Thanks!

    I managed to do it by creating a 'master list' of all the rivet programs possible (basically 1 - 200), naming that range and creating a data validation list and then using your averageif formula to calc the average based on the number chosen in the data val list.

    I did try and make a chart with loads of functions but gave up...think I will do that the long way

    Thanks for your 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