Hi there. I'm back again pleading with you nice people to help if possible.
I've got 2 sheets in my spreadsheet. Sheet one give me part to build (column A) colour (column B) and time (column C) required.
Sheet 2 gives me How many parts of each colour (column A) and Quantity in stock (column B)
I'm trying to write a macro that will start at the top of sheet 1. It will look at the top entry in the colour column and check to see if we have any stock for that colour in sheet 2. I then want the macro loop to delete 1 from the stock level. and go down to the next line. If we have no stock of that colour left then i'd like it to say "Warning" instead of 0.
This mean i can look down the list on sheet A and see approximatly what time we'll run out of that colour.
Sheet 1:
A B C D
Part 1 Red 06:00
Part 2 Red 07:00
Part 3 Blue 08:00
Sheet 2:
A B
Red 1
Blue 10
Black 2
By the time the macro has run it should look like:
Sheet 1:
A B C D
Part 1 Red 06:00 OK
Part 2 Red 07:00 Warning
Part 3 Blue 08:00 OK
Sheet 2:
A B
Red 0
Blue 9
Black 2
If anyone could help me out it would be very much appreciated. If you need more information then please let me know.
Thanks in advance for any help.
Ricky.
I've got 2 sheets in my spreadsheet. Sheet one give me part to build (column A) colour (column B) and time (column C) required.
Sheet 2 gives me How many parts of each colour (column A) and Quantity in stock (column B)
I'm trying to write a macro that will start at the top of sheet 1. It will look at the top entry in the colour column and check to see if we have any stock for that colour in sheet 2. I then want the macro loop to delete 1 from the stock level. and go down to the next line. If we have no stock of that colour left then i'd like it to say "Warning" instead of 0.
This mean i can look down the list on sheet A and see approximatly what time we'll run out of that colour.
Sheet 1:
A B C D
Part 1 Red 06:00
Part 2 Red 07:00
Part 3 Blue 08:00
Sheet 2:
A B
Red 1
Blue 10
Black 2
By the time the macro has run it should look like:
Sheet 1:
A B C D
Part 1 Red 06:00 OK
Part 2 Red 07:00 Warning
Part 3 Blue 08:00 OK
Sheet 2:
A B
Red 0
Blue 9
Black 2
If anyone could help me out it would be very much appreciated. If you need more information then please let me know.
Thanks in advance for any help.
Ricky.