+ Reply to Thread
Results 1 to 10 of 10

counting a range based on nth cell

  1. #1
    Registered User
    Join Date
    02-04-2019
    Location
    Australia
    MS-Off Ver
    MSOffice 2010
    Posts
    25

    counting a range based on nth cell

    Hi everyone i have a tricky one,

    basicall only count (M3:AJ3), if (AP16) is more than 3

    but if AP16 is 3 or less only count M3:Z3

    is there a formula for this ?

    Thankyou!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: counting a range based on nth cell

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    02-04-2019
    Location
    Australia
    MS-Off Ver
    MSOffice 2010
    Posts
    25

    Re: counting a range based on nth cell

    thankyou! that worked quite well, i was also wondering if there is a way to..

    only count (M3,T3,V3:Z3,AB3:AD3,AG3:AH3,AJ3), if (AP16) is less than 3

    thankyou in advance

  4. #4
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: counting a range based on nth cell

    Yes you can select cells M3,T3,V3:Z3,AB3:AD3,AG3:AH3,AJ3 [with hold ctrl key]
    Go to Name Manager tab > click new > In name mentioned Range > click OK
    In "AL3"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    See attach.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  5. #5
    Registered User
    Join Date
    02-04-2019
    Location
    Australia
    MS-Off Ver
    MSOffice 2010
    Posts
    25

    Re: counting a range based on nth cell

    Thankyou atul, sothis is the formula I have

    =IF(AQ28<=4,COUNTA(M3,T3,V3:Z3,AB3:AD3,AG3:AH3,AJ3),"")

    is it possible (AM) to only multiply range M3,T3,V3:Z3 by 5 so that only data appearing under them is x5 the value? so it looks something like this =IF(AQ28<=4,COUNTA(((M3,T3,V3:Z3)*5),AB3:AD3,AG3:AH3,AJ3),"") ( but obviously its not giving the correct out put)

    if the original formula has an output of 3, I would like to have the 5 multiplier to have the answer as 11

    thank you again

  6. #6
    Registered User
    Join Date
    02-04-2019
    Location
    Australia
    MS-Off Ver
    MSOffice 2010
    Posts
    25

    Re: counting a range based on nth cell

    please see attached document with dummy solution
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: counting a range based on nth cell

    Try the following: =IF(AQ28<=4,SUMIFS(M3:Z3,M$2:Z$2,"technical error*")*5+SUMIFS(AA3:AJ3,AA$2:AJ$2,"technical error*"),"")
    Let us know if you have any questions.
    Last edited by JeteMc; 02-22-2019 at 06:25 PM. Reason: Correction to Formula
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: counting a range based on nth cell

    Is AQ28 a mistake?
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    02-04-2019
    Location
    Australia
    MS-Off Ver
    MSOffice 2010
    Posts
    25

    Re: counting a range based on nth cell

    thankyou both jetemc and protonleah, sorry AQ28 should have been AQ16.

    =IF(AQ16<=4,SUMIFS(M3:Z3,M$2:Z$2,"technical error*")*5+SUMIFS(AA3:AJ3,AA$2:AJ$2,"technical error*"),"") - worked perfectly, I do have one last question though


    is there a way to integrate this formula...

    =IFERROR(INDEX(Sheet2!$AK$3:$AK$13,MATCH($B5,Sheet2!$A$3:$A13,0)),"")

    to have it process the below?

    to have Sheet 1 column H Populates data from Sheet 2 AK.. unless there is data in AL- then have sheet 1 Column H populate data from Sheet2 AL.

    there is an example solution attached
    Attached Files Attached Files

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: counting a range based on nth cell

    Try the following:
    1. Select cell H3 on Sheet1,
    2. Paste the following into the formula bar:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3. Double click to copy down.
    Let us know if you have any questions.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 09-05-2018, 08:42 AM
  2. Counting Nights Based on a Date Range
    By dfish34 in forum Excel General
    Replies: 4
    Last Post: 03-13-2018, 03:22 PM
  3. Counting instances in one cell range for days of week in another range
    By NGothIda in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-13-2014, 12:11 PM
  4. Replies: 2
    Last Post: 08-17-2012, 04:56 PM
  5. [SOLVED] Counting ammount of values within a range based on text
    By nonterrorist in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-07-2012, 09:16 PM
  6. Counting a value based on a range of dates
    By Sean Donohoe in forum Excel General
    Replies: 2
    Last Post: 11-18-2009, 12:44 PM
  7. Counting unique records based on date range
    By aspAddict in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-26-2005, 04:05 PM

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