+ Reply to Thread
Results 1 to 4 of 4

Countif or something equivalent to count items based on relative position in a rack map

  1. #1
    Registered User
    Join Date
    01-17-2013
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2011
    Posts
    3

    Countif or something equivalent to count items based on relative position in a rack map

    I have a very simple rack layout in excel where the each Row represents one Rack unit. Each Column of 45 Cells represents a Rack. Individual cells are merged based on the Rack U height and placed in the layout.

    Racks are 45 U high
    Devices 1 U in height get 1 cable
    Devices with 2 U in height get 2 cables
    and devices that are larger, get 4 cables

    I'm using cables that are 3, 4, 5, 6, 8, and 10 feet long to reach the switches that they connect to.

    Each device in the rack is simply labeled "R320-xxx" or "R720-xxx" to denote the type of device, and the future project number. I'm simply trying to get a count of each length of cable needed based on the relative position of the devices in the racks. These racks span across two rows, so Row A has 10 racks, Row B has 10 Racks.

    I've been using "3 foot" =(COUNTIF(B3:B10,D1)*2)+(COUNTIF(B3:B10,E1))+(COUNTIF(D3:D10,D1)*2)+(COUNTIF(D3:D10,E1))...... and on and on.

    This gives me the information that I need but it's painful. Needless to say, I have to use the Countif on a range in the relative position zone that I have defined, for each and every type of device (1U 2U or 10U) and each rack, resulting in just one formula having to use Countif 60 times or more depending on the number of racks I have. Then having to repeat this formula for each length of cable with different ranges. While this works it's incredibly painful. The reason it is painful, is that each rack in-between has a slightly different range because they need to reach the rack next to them. Is there an easy way to do this, and use it in a template, so I can simply specify the ranges, that each criteria belongs to, and add them up to get the correct count?

    I've tried different things including the following that all return #VALUE
    =Sum(If(Range,Criteria(If(Range, Criteria)0,1)))... =#VALUE
    =SUMPRODUCT <---Confusing =#VALUE
    =(COUNTIFS(range1, criteria1, range2, criteria1))+(COUNTIFS(Range1, criteria2, Range 2, criteria2)*2)... =#VALUE

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Countif or something equivalent to count items based on relative position in a rack ma

    Please post a sample with some examples of what you have, what you want, and what is happening with what you've tried, this will make it much easier to give you a valid answer

    Add a File - click advanced (next to quick post), scroll down until you see "manage attachments", click that and select "add files" (top right corner). click "select files", find your file, select file, click "upload", when the file shows up at the bottom left click 'done"(bottom right). click "submit reply"(remember the 1 MB limit, you may have to crop your file down to get it to a size that can be uploaded...)
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Countif or something equivalent to count items based on relative position in a rack ma

    As dred suggests, upload a sample workbook.

    But also, take a look at countifS(), and maybe use a table range
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    01-17-2013
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2011
    Posts
    3

    Re: Countif or something equivalent to count items based on relative position in a rack ma

    I will have to sanitize it a bit. I'll post it soon. Thanks.

+ 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