So I've got a big stock spreadsheet with multiple tabs to seperate catergories and within each tab is a table. each containing items, each with multiple sizes and then the quantity etc.
for example one group of items I have is
<colgroup><col span="2"><col></colgroup><tbody>
</tbody>
I want the spreadsheet to create a 'code' for each item depending on the item name and size for example for the first item the code would be STFC34.
I can write a single IF function in one cell to calculate that but I have over 500 items on 6 different sheets that I want it to dictate. So is there a VBA or something that I can write that it can generate the code dependant of the item and size.
The if code I have for a single cell is:
=IF(AND(Table1[@Item]="Staff Cardigan",Table1[@Size]=34),"STFC34",IF(AND(Table1[@Item]="Staff Cardigan",Table1[@Size]=36),"STFC36"))
obviously this would work for the first two lines but I would like to write something that could do the whole table in one go!
Please Help! I havent used VBA before so if someone could help to write one if function for the first line then I can copy it to input the codes for each item I want to use.
for example one group of items I have is
Item | Code | Size |
Staff Cardigan | 34 | |
Staff Cardigan | 36 | |
Staff Cardigan | 38 | |
Staff Cardigan | 40 | |
Staff Cardigan | 44 | |
Staff Cardigan | 46 |
<colgroup><col span="2"><col></colgroup><tbody>
</tbody>
I want the spreadsheet to create a 'code' for each item depending on the item name and size for example for the first item the code would be STFC34.
I can write a single IF function in one cell to calculate that but I have over 500 items on 6 different sheets that I want it to dictate. So is there a VBA or something that I can write that it can generate the code dependant of the item and size.
The if code I have for a single cell is:
=IF(AND(Table1[@Item]="Staff Cardigan",Table1[@Size]=34),"STFC34",IF(AND(Table1[@Item]="Staff Cardigan",Table1[@Size]=36),"STFC36"))
obviously this would work for the first two lines but I would like to write something that could do the whole table in one go!
Please Help! I havent used VBA before so if someone could help to write one if function for the first line then I can copy it to input the codes for each item I want to use.