+ Reply to Thread
Results 1 to 9 of 9

Formula on worksheet that changes column if copied on new worksheet

  1. #1
    Registered User
    Join Date
    03-24-2021
    Location
    England
    MS-Off Ver
    excel for microsoft 365
    Posts
    5

    Question Formula on worksheet that changes column if copied on new worksheet

    Hi all,

    I couldn't manage to make it make sense in the title. Let's hope I do here.
    So, I am making an excel file that counts stock holding.
    On the first worksheet, I have done a sales sheet where I input sales per week for each items throughout the year.
    On the next worksheets (12 in total - one per month), I have all my items and their quantity (QTY initial). They also have the quantity used (QTY out) that refers to the first worksheet total sales for all the weeks in a month.
    I have done my formulas for January and would like to know if there is a way to copy/paste in the February one so that they count the sales from February.
    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,207

    Re: Formula on worksheet that changes column if copied on new worksheet

    Why are the Jan formulae so "random" and bear no obvious relationship to the first sheet. Normally we would expect Product list in Month to match the one in first sheet.

    If you want to create generic formulare, assign DATES to the WEEK numbers so can check if data is between a start and finish date OR add a test to check if data lies between WK1 and WK4 (say for January)

    The likely candidate is SUMIFS to replace the SUM to include a date (month/week) check.

  3. #3
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Formula on worksheet that changes column if copied on new worksheet

    Hi Pierre:

    Welcome to the forum.

    Don't laugh, but I think I figured out one way.

    Go to the FebStock tab. Enter 4 empty columns after column A so that your table begins in column F.
    Now, go back to your jan Stock tab and copy columns E through L.
    Now, go back to your Feb Stock paste those columns over column I through P.

    You've now brought in the formulas to reflect the Feb transactions.
    Now, on the Feb tab, delete the empty columns A:D and your formulas are now intact.

    Do the same for March; BUT add 8 additional columns, paste from the January file as you did with February. . BUT seeing that there are 5 weeks that report to March, after pasting, you'll have to adjust your columns to be K to O. Find and replace in formulas should do it.

    Continue using this method for the rest of the months, adding columns, copying existing formulas, and adjusting for the number of weeks in a month. Then deleting the extra columns.

    It will take a little bit of time, keep track of where you're at, and you should be up and running.

    Do report back.

    Pete
    Last edited by PeteABC123; 03-24-2021 at 05:52 PM.

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

    Re: Formula on worksheet that changes column if copied on new worksheet

    I can see formula in Jan Stock for "Havana Especial (50ml)": Cocktail Box row 7+12+13+14, which are:
    Jungle Birds
    Best of Britain
    The Classics

    Are they raw marterias to make Finished goods "Havana Especial (50ml)" ?

    If yes, try to build a recipe table with raw material run down rows and finished goods run accross columns

    From that table, we can define which materials needed for specific products.
    Quang PT

  5. #5
    Registered User
    Join Date
    03-24-2021
    Location
    England
    MS-Off Ver
    excel for microsoft 365
    Posts
    5

    Re: Formula on worksheet that changes column if copied on new worksheet

    Hi John,
    Thank you for your reply and sorry about the delay on mine.
    We sell cocktail boxes. Each with different ingredients. That is why they look random to you.
    There might have been an easier way to build this worksheet though.

  6. #6
    Registered User
    Join Date
    03-24-2021
    Location
    England
    MS-Off Ver
    excel for microsoft 365
    Posts
    5

    Re: Formula on worksheet that changes column if copied on new worksheet

    Hi Pete,

    Wow! It does work! I did laugh though, but in a good way.
    Thank you so much for that!

    Pierre.

  7. #7
    Registered User
    Join Date
    03-24-2021
    Location
    England
    MS-Off Ver
    excel for microsoft 365
    Posts
    5

    Re: Formula on worksheet that changes column if copied on new worksheet

    Hi Bebo,

    Thanks for your reply. Here what I am trying to achieve:

    I am selling boxes that each contain different ingredients (although some are similar).
    I want a worksheet where I can add the sales of each items. And the main issue I'm having is to also make a worksheet that automatically counts (referring to sales) the amount of stock depleted.

    Do you believe I should rethink the whole layout?

    Let me know.

    Thank you.

  8. #8
    Registered User
    Join Date
    03-24-2021
    Location
    England
    MS-Off Ver
    excel for microsoft 365
    Posts
    5

    Re: Formula on worksheet that changes column if copied on new worksheet

    Thanks Ali,

    All done.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,896

    Re: Formula on worksheet that changes column if copied on new worksheet

    I removed my post as I thought from your last one that I was wrong and this hadn't yet been solved. If you are still wanting further help, remove the solved tag for a while. If not, leave it as it is.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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: 1
    Last Post: 08-19-2020, 12:02 AM
  2. [SOLVED] Change code to ensure last comments on a worksheet row are copied to the summary worksheet
    By ghostly1 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-26-2020, 01:06 PM
  3. [SOLVED] Copied check boxes contain worksheet reference to source worksheet
    By JimDandy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2015, 03:53 PM
  4. Replies: 2
    Last Post: 12-15-2014, 06:34 PM
  5. Copy data from a copied worksheet to another worksheet based on cell reference
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2013, 02:18 PM
  6. [SOLVED] How to add in worksheet name of copied range to a new column on sumary sheet
    By Jcheng83 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-04-2013, 11:04 AM
  7. info/data transferred/copied from worksheet to worksheet in same workbook!
    By joe dech in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-17-2012, 02:53 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