Consulting

Results 1 to 2 of 2

Thread: Macro IF statements

  1. #1

    Macro IF statements

    Hi everyone,

    Please see attached my sample file. Before stating my questions, here are a few pieces of information:

    1) Data is copied and pasted from "SAP" to "Master Worksheet" from column A-M, so the Macro(s) should start working from column N to the right.

    2) The file has 8 Day columns in total featuring the last 8 days of the month. Each Day is accompanied by 3 extra columns: Sales, Production, and Status. Ex: Day 1 starts at column N to column Q (Sales, Production, Day 1, Status) respectively). Then comes Day 2 with the same column order and so on until Day 8.


    3) Data for those Day columns is entered on different days.




    I'd like to create 2 macros for "Master Worksheet" tab where:


    1) If "Shipped" in column AV (MB51 Shipped), then the empty remaining Days will have "Rollup" for both Production and Sales.
    Ex: In my file, cell AV9 has "Shipped" and data was entered up to Day 3 which means Day 4 to Day 8 were all empty and would return "Rollup" for Sales and Production columns (highlighted in black as shown in the sample file)

    2) If the last status of Sales column says "Title Transfer", then return "x" in Column AY (Title Transfer).
    Please note the file has 8 Sales columns in total.

    Ex:In my Sample file, cell V7 (Sales cell) is the last Sales cell that has "Title Transfer" status, the macro should automatically return an "x" in cell AY7 (see sample file)

    3) Also, I don't know why but the IF functions in column AC didn't really work as some returned values and some didn't. From what I see the returned values look the same?
    Capture.jpg
    I don't have any programming background and just took over a former colleague's project. Any help is greatly appreciated! Please let me know if you need more information.

    Thank you!
    Attached Files Attached Files
    Last edited by alisonclever; 02-13-2020 at 01:40 PM.

  2. #2
    Please disregard Question 3 as I found out there was a mistake in the code for that part.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •