+ Reply to Thread
Results 1 to 4 of 4

Shifting "table" to desire range and sumif by last Digit.

  1. #1
    Forum Contributor
    Join Date
    03-12-2012
    Location
    Singapore
    MS-Off Ver
    MS 365
    Posts
    532

    Shifting "table" to desire range and sumif by last Digit.

    Currently, the clerk in my company will key in the "Gain" in the respective cost centre column. We have 5 Brand and each brand is split to 3 department. The Cost Centre is 4 digit. The first 2 digit represent the Brand while the last 2 digit represent the department (Sales, Aftersales, Service).

    HOwever, we have 5 Brand * 3 Department which is 15 Cost Centre. Refer to Tab "Data Entry". After the Clerk input the "Data Entry". Another person will add in a "Summary" at tab "Current Report". U can see that the formula is quite Manual. After which he will print and show it to the boss.

    HOwever, as you can see, not all the 15 Cost centre will have figure. Normally we only use 3-4 of them and the rest is all Blank.

    Hence i come up with a way, see "Propose Report". HOwever, i discover a problem. I am not able to Shift the Summary to the end of the Data. And aso. i don't know how to SUmif by last Digit.

    Anybody can help?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Shifting "table" to desire range and sumif by last Digit.

    Confused by how you determine the Cost Centre with many blank columns.

    Try

    in Q2 and copy across

    =SUMPRODUCT(($B$2:$N$10)*(RIGHT($B$1:$N$1,2)=VLOOKUP(Q1,'Formula to get Cost Centre'!$A$1:$B$10,2,0)))

    where columns A:B in "Formula to get cost centre" have the following:


    Sales 01
    Aftersales 02
    Service 03

    The 01 etc are TEXT entries

    This will give TOTAL for each department: extend range as required

  3. #3
    Forum Contributor
    Join Date
    03-12-2012
    Location
    Singapore
    MS-Off Ver
    MS 365
    Posts
    532

    Re: Shifting "table" to desire range and sumif by last Digit.

    Quote Originally Posted by JohnTopley View Post
    Confused by how you determine the Cost Centre with many blank columns.

    Try

    in Q2 and copy across

    =SUMPRODUCT(($B$2:$N$10)*(RIGHT($B$1:$N$1,2)=VLOOKUP(Q1,'Formula to get Cost Centre'!$A$1:$B$10,2,0)))

    where columns A:B in "Formula to get cost centre" have the following:


    Sales 01
    Aftersales 02
    Service 03

    The 01 etc are TEXT entries

    This will give TOTAL for each department: extend range as required
    The cost centre i show is ALL the cost centre that we have. However, some cost centre is quite inactive, n some have transaction maybe once 1 year.
    Hence there is many blank in the row.

    Anyway, who know how to Sumif by last digit of the cost centre?

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Shifting "table" to desire range and sumif by last Digit.

    The formula give sums by department.

+ 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: 5
    Last Post: 01-23-2014, 11:02 AM
  2. List Data Validation + option of "INC"+12 digit number"
    By penfolda in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-29-2013, 02:53 AM
  3. Replies: 2
    Last Post: 06-06-2013, 12:45 PM
  4. [SOLVED] date range in " sumif " or sumproduct "
    By Samir Alamad in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-22-2012, 09:23 AM
  5. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  6. Performing "SUMIF" where "range" & criteria" are texts
    By joseedua in forum Excel General
    Replies: 1
    Last Post: 02-11-2010, 01:09 PM
  7. use variable in Workbooks("book1").Worksheets("sheet1").Range("a1"
    By Luc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2005, 04:05 PM
  8. Replies: 2
    Last Post: 01-11-2005, 07:06 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