+ Reply to Thread
Results 1 to 5 of 5

Can I divide one colums of data into two sets of bins to prepare an array for contour

  1. #1
    Registered User
    Join Date
    01-20-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Question Can I divide one colums of data into two sets of bins to prepare an array for contour

    Hello All,

    I have a pretty complicated Excel problem that I've been trying to solve using array formulas without success. I am a total novice at VBA and so ideally a formula approach would suit me best to fix this but I'm willing to try anything!

    I have a set of data from an experiment which consists of a column of sizes and another with a measurement. I have managed to get the size data split into bins using the following array formula:

    =FREQUENCY(size,I3:I52)

    What I really want is to be able to have another set of bins with the measurement in and then only count the size of the measurements of a given value. Well... from here it went a bit crazy! I tried many things with varying success (please bear in mind that I was trying most of these for the first time):

    Dcount - just gave total count in all bins
    Countif (AND) - was hoping it would only count the size if the measurement was between two values but couldn't get the syntax right to even see if it was right!
    Count(if(and( - Same goal as above but again the sytax wasn't good for me

    All of these still involve me manually assigning the measurement bins and then using a round about way of saying if between these to numbers. I
    Basically it wouild be nice to be able to just have =FREQUENCY(size,I3:I52)AND(measurement,K3:z3) obviously wrong syntax but I hope it gets the point across. The overall aim is to have the number of each measurement value for each size and then plot this on a contour plot. The instrument that does this at the moment does it all in MSDOS and so I'm trying for an update.

    I look forward to any advice you can give me

    Cheers

    Jarvice
    Last edited by Jarvice; 01-20-2012 at 06:25 PM. Reason: used ral name...doh!

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Can I divide one colums of data into two sets of bins to prepare an array for con

    Jarvice,

    Welcome to the forum!
    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    01-20-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Can I divide one colums of data into two sets of bins to prepare an array for con

    That's good advice... I've just knocked this simple example together (see attached). I've got the two columns, size and measurement and I can assign bins and calculate frequency individually but what I want is the array at the end, where counts are related to the sizes of a certain measurement. Hope this helps a bit.

    Now that you've pointed that out it'll be alot easier for me to work on my syntax issues than the original which has around 3000 rows and data to 5 decimal places....
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Can I divide one colums of data into two sets of bins to prepare an array for con

    maybe something like this?see sheet 2
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    01-20-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Can I divide one colums of data into two sets of bins to prepare an array for con

    Cheers Martin,

    That's very close to what I need but deals in exact matches rather than <=. The sort of data that I'll be analysing will need to be split into bins (around 50 for size and maybe 15 or 20 for the measurement) and so I'll be needing. I've been looking at pivot table options for this and it seems quite promising. Now to test it with 3000 rows!

    Thanks for all your help. I'm sure I'll be back next time I'm stuck as I've got macros and basic progams as my next goal

    Jarvice
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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