+ Reply to Thread
Results 1 to 5 of 5

Realign numbers based on change in the month

  1. #1
    Registered User
    Join Date
    12-22-2014
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    89

    Realign numbers based on change in the month

    Hello friends,

    In my line of work I do stock forecasting to maintain optimum inventory.

    Original sheet shows the forecast quantity for each month for each product
    There are times when a product becomes obsolete and its replaced by another product with better specifications. This is called transitioning from one product to another.
    Taking example from the attached file in sheet" Original", SKU 533838 was going to transition to 571728 in the Feb-18 until last month based on the stock remaining.
    But this month it has changed to Jun-18 again based on current stock remaining.

    I want to be able to lookup the month in column H from the sheet "Lookup" and accordingly make changes to the numbers in the original sheet. So the result should look like that in sheet "Result".
    Please note I dont want to create a new sheet but amend the numbers in the existing sheet.
    There will be numerous product changes and the original sheet has a couple of thousand rows in it so its import to lookup the SKU code within that column.
    Can it be done using VBA?

    Thank you
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-22-2014
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    89

    Re: Realign numbers based on change in the month

    Any ideas how this can be tackled?
    I am happy to provide any further clarity.

  3. #3
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Realign numbers based on change in the month

    This is an ARRAY formula - in D3 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It must be committed with {CTRL}{SHIFT}{ENTER}
    - and then will look like this
    {=IFERROR(INDEX(Lookup!H$3:H$99999,MATCH(A3&C3,Lookup!A$3:A$99999&Lookup!D$3:D$99999,0)),"")}
    - it will not work if you type in the {} brackets

    2 columns are concatenated for both the lookup value and lookup array
    The lookup formula is wrapped in IFERROR to eliminate #N/A errors showing everywhere

    Note
    - I used rows 3:99999
    - the row numbers must be consistent in all the ranges
    - I would generally use complete columns (avoids specifying row numbers)
    - but your merged cells prevented that (soapbox - merged cells should be avoided at all costs! )

    arrayamtch.jpg
    Attached Files Attached Files
    Last edited by kev_; 02-22-2018 at 01:20 PM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  4. #4
    Registered User
    Join Date
    12-22-2014
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    89

    Re: Realign numbers based on change in the month

    Hi Kev_

    Thanks for your response.

    But I dont see how its working. The formula is just doing a lookup and putting the month in the column D

    What I need is based on the changed month in sheet "Lookup", it should make changes to the numbers that are highlighted in yellow.

    Let me explain a bit further.
    SKU 533838 is replaced by 571728 in Feb-18. So 533838 has 3 units forecast in Jan and then the forecast moves to SKU 571728.
    But as per latest info the replacement will happen in "Jun-18". So SKU 533838 should still show forecast units from Jan - May-18. But from Jun-18 the forecast should move to SKU 571728.

    Hope that explains a bit.

    Cheers

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Realign numbers based on change in the month

    Apologies for misunderstanding the scale of your requirements.

+ 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. Need a fumula to change month based on the spreadsheets month
    By marah64 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-21-2015, 07:00 PM
  2. Formula for adding numbers based on month
    By wonderd in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-04-2015, 09:46 PM
  3. Replies: 7
    Last Post: 02-27-2014, 10:56 PM
  4. Replies: 4
    Last Post: 03-02-2013, 02:51 PM
  5. [SOLVED] Sum range of numbers based on Name and Month
    By Toli in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 08-04-2012, 04:03 PM
  6. change text date to month numbers?
    By raveepoojari in forum Excel General
    Replies: 12
    Last Post: 07-14-2010, 01:58 PM
  7. [SOLVED] Change Month (words) to (numbers)
    By Cathy in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-28-2006, 09:12 AM

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