Forum Discussion

Gurpreet20's avatar
Gurpreet20
Copper Contributor
Apr 30, 2024

Re: Adding a unique customer # after every 5th row

OliverScheurich 

Hi Oliver. Hope you're doing well.

The code you'd created has been working well and I've been using pretty much every day. However, I was hoping if you can adjust the code to reflect the following changes in the attached spreadsheet.

- The stores will now have a classification code - A,B,C,D (mentioned in column J) and based on this classification they will receive different items and quantities at different costs which all I've mentioned in other sheets named storeA, storeB etc.

Is it possible for the code to look in those sheets and automatically update quantities and cost in the main sheet "Tabelle1"?

- Right now there are 200 stores in column K of the sheet Tabelle1. Let's say I only want to do orders for 50 stores (combined A,B,C,D).

Could the values be automatically be updated in columns A through D when I enter 50 stores numbers in column K and their corresponding store classification in column J?

Lastly, column D with "HEADER" rows requires last 4 digits of the store # which can be grabbed from either column C or column K plus add this default value of "KRU".

Variable values for the following columns but only for rows with "HEADER" text. If the code can grab the values from "Values" sheet that would be great.
Column E = Order date
Column F = Ship date
Column H = Comment
Column I = Comment1

Thanks.

 

4 Replies

  • OliverScheurich's avatar
    OliverScheurich
    Gold Contributor

    Gurpreet20 

    Hi Gurpreet, i hope you're doing well too.

     

    In your last message you wrote:

     

    Could the values be automatically be updated in columns A through D when I enter 50 stores numbers in column K and their corresponding store classification in column J?

     

    Does this mean that you want to enter store numbers in column K and the classification in column J and have the results updated without running the macro by clicking the button which is now in cell W4? This could be possible with a worksheet change event. Does the code return the intended result if you run it by clicking cell W4? If so i could try to write the code for the worksheet change event.

     

    In sheets StoreA, StoreB, StoreC and StoreD i've removed the headers which simplifies the code considerably. I hope this is ok with you.

     

Resources