+ Reply to Thread
Results 1 to 5 of 5

ROUNDUP not working for ranges in same row

  1. #1
    Forum Contributor
    Join Date
    05-10-2019
    Location
    Penang, Malaysia
    MS-Off Ver
    2016
    Posts
    262

    ROUNDUP not working for ranges in same row

    Hi All,

    I am trying to achieve the followings:
    1. Column M4:Q1, N4:Q2, O4:Q3, P4:Q4 are the Quarters. However, the function =ROUNDUP(MONTH($D$4:$L$4)/3,0) is not working when dates are in the same row D4:L4

    Since the above is not working, I cant get what im trying to achieve
    2. IF any dates fall from D4:L4, the quarter will be displayed to the Column M4:Q1, N4:Q2, O4:Q3, P4:Q4 respectively.

    However, the ROUNDUP is working only if dates are in the same column =ROUNDUP(MONTH($D$4:$D$13)/3,0)

    Any help is greatly appreciated. Please find attachment.

    Thank-You very much.
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: ROUNDUP not working for ranges in same row

    it is working in the cols because all the dates are the same. it is not working in the rows because you are putting a RANGE in the arg of the MONTH() function when that is looked at as invalid by excel . see here:

    https://support.microsoft.com/en-us/...0-ddba0eba86e8

    furthermore, you're attempting to divide the invalid return by 3. that won't work either. see here:

    https://support.microsoft.com/en-us/...3-db171d0c42a7

    this is my guess.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: ROUNDUP not working for ranges in same row

    Are you trying to test whether any date matchs with Quarter?

    In M4 then drag down and accross:

    =SUMPRODUCT(COUNTIF(M$3,"Q"&MATCH(MONTH($D4:$L4&""),{1,4,7,10})))
    Quang PT

  4. #4
    Forum Contributor
    Join Date
    05-10-2019
    Location
    Penang, Malaysia
    MS-Off Ver
    2016
    Posts
    262

    Re: ROUNDUP not working for ranges in same row

    Hi VBA_php, bebo021999

    Thanks for the solutions & make me understood where I went wrong. Issued you both reputations & mark this thread to SOLVED.

    Thank-You very much

  5. #5
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: ROUNDUP not working for ranges in same row

    very nice! take care.

+ 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. Working with ranges
    By guyglk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-09-2020, 12:00 PM
  2. Working with ranges
    By guyglk in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2020, 05:56 AM
  3. ROUNDUP not working
    By goalieman86 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2018, 06:46 PM
  4. [SOLVED] Working with Ranges
    By troussis in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-10-2014, 10:20 PM
  5. [SOLVED] countifs working on extended ranges and different sheets not working
    By etaf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2013, 02:23 PM
  6. Working with two ranges
    By udigold1 in forum Excel General
    Replies: 1
    Last Post: 08-27-2008, 10:04 AM
  7. ROUNDUP copy/paste and fill handle not working
    By Jason Southco in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-10-2005, 01: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