Hi,
I have two sheets in a workbook. Sheet1 includes information on average monthly pocket money of students from different schools.
Sheet1:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Month[/TD]
[TD]School1[/TD]
[TD]School2[/TD]
[TD]School3[/TD]
[TD]School4[/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]100[/TD]
[TD]125[/TD]
[TD]125[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Feb[/TD]
[TD]125[/TD]
[TD]100[/TD]
[TD]75[/TD]
[TD]125[/TD]
[/TR]
[TR]
[TD]Mar[/TD]
[TD]75[/TD]
[TD]150[/TD]
[TD]100[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]Apr[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]125[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]May[/TD]
[TD]90[/TD]
[TD]125[/TD]
[TD]100[/TD]
[TD]125[/TD]
[/TR]
[TR]
[TD]Jun[/TD]
[TD]100[/TD]
[TD]150[/TD]
[TD]75[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Jul[/TD]
[TD]125[/TD]
[TD]125[/TD]
[TD]125[/TD]
[TD]125[/TD]
[/TR]
</tbody>[/TABLE]
Sheet2 includes information about Students studing in which school and the month.
Sheet2:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Month[/TD]
[TD]Student ID[/TD]
[TD]School[/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]1234[/TD]
[TD]School3[/TD]
[/TR]
[TR]
[TD]Mar[/TD]
[TD]1235[/TD]
[TD]school2[/TD]
[/TR]
[TR]
[TD]May[/TD]
[TD]1236[/TD]
[TD]School1[/TD]
[/TR]
[TR]
[TD]June[/TD]
[TD]1237[/TD]
[TD]School4[/TD]
[/TR]
</tbody>[/TABLE]
Somewhere in sheet2, I have a value say in cell E1. Lets say E1 has a value 4.
Now, I want information from sheet2 to be matched with Sheet1 and in case of match copy it on sheet3 as
Step1:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Month[/TD]
[TD]Student ID[/TD]
[TD]School1[/TD]
[TD]School2[/TD]
[TD]School3[/TD]
[TD]School4[/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]1234[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Feb[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mar[/TD]
[TD]1235[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Apr[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]May[/TD]
[TD]1236[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jun[/TD]
[TD]1237[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jul[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Later as step2, based on Student ID and corresponding school, we need to identify their corresponding month and value of E1 (for this example we have considered it as 4).
Case1:
For Student ID: 1234
Month: Jan,
School: School3
E1: 4
On sheet1 after mapping Jan and corresponding School3 value for month Jan, I need to add pocket money for next 4 months. i.e. pocket money of Jan, Feb, Mar, Apr will be added (i.e. 125, 75, 100, 125) and the sum (425) value will be inserted in Sheet3[row Jan; Column School3].
Case2:
ID: 1235
Month: Mar
School: School2
E1: 4
On sheet1 after mapping Mar and corresponding School2 value for month Mar, I need to add pocket money for next 4 months. i.e. pocket money of Mar, Apr, May, Jun will be added (i.e. 150, 100, 125, 150) and the sum (525) value will be inserted in Sheet3[row Mar; Column School2].
Case3:
ID: 1236
Month: May
School: School1
E1: 4
On sheet1 after mapping May and corresponding School1 value for month Mar, I need to add pocket money for next 4 months. i.e. pocket money of May, Jun, Jul, Aug. As we dont have August in Sheet1, so we add only May, Jun, Jul and he sum (i.e. 90 + 100 + 125= 315) value will be inserted in Sheet3[row May; Column School1].
Case4:
ID: 1237
Month: Jun
School: School4
E1: 4
On sheet1 after mapping Jun and corresponding School1 value for month Jun, I need to add pocket money for next 4 months. i.e. pocket money of Jun, Jun, Aug, Sep. As we dont have Aug and Sep in Sheet1, so we add only Jun, Jul and the sum (i.e. 100 + 125= 225) value will be inserted in Sheet3[row Jun; Column School4].
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Month[/TD]
[TD]Student ID[/TD]
[TD]School1[/TD]
[TD]School2[/TD]
[TD]School3[/TD]
[TD]School4[/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]1234[/TD]
[TD][/TD]
[TD][/TD]
[TD]425[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Feb[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mar[/TD]
[TD]1235[/TD]
[TD][/TD]
[TD]525[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Apr[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]May[/TD]
[TD]1236[/TD]
[TD]315[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jun[/TD]
[TD]1237[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]225[/TD]
[/TR]
[TR]
[TD]Jul[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance for all your help.
Cheers
I have two sheets in a workbook. Sheet1 includes information on average monthly pocket money of students from different schools.
Sheet1:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Month[/TD]
[TD]School1[/TD]
[TD]School2[/TD]
[TD]School3[/TD]
[TD]School4[/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]100[/TD]
[TD]125[/TD]
[TD]125[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Feb[/TD]
[TD]125[/TD]
[TD]100[/TD]
[TD]75[/TD]
[TD]125[/TD]
[/TR]
[TR]
[TD]Mar[/TD]
[TD]75[/TD]
[TD]150[/TD]
[TD]100[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]Apr[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]125[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]May[/TD]
[TD]90[/TD]
[TD]125[/TD]
[TD]100[/TD]
[TD]125[/TD]
[/TR]
[TR]
[TD]Jun[/TD]
[TD]100[/TD]
[TD]150[/TD]
[TD]75[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Jul[/TD]
[TD]125[/TD]
[TD]125[/TD]
[TD]125[/TD]
[TD]125[/TD]
[/TR]
</tbody>[/TABLE]
Sheet2 includes information about Students studing in which school and the month.
Sheet2:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Month[/TD]
[TD]Student ID[/TD]
[TD]School[/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]1234[/TD]
[TD]School3[/TD]
[/TR]
[TR]
[TD]Mar[/TD]
[TD]1235[/TD]
[TD]school2[/TD]
[/TR]
[TR]
[TD]May[/TD]
[TD]1236[/TD]
[TD]School1[/TD]
[/TR]
[TR]
[TD]June[/TD]
[TD]1237[/TD]
[TD]School4[/TD]
[/TR]
</tbody>[/TABLE]
Somewhere in sheet2, I have a value say in cell E1. Lets say E1 has a value 4.
Now, I want information from sheet2 to be matched with Sheet1 and in case of match copy it on sheet3 as
Step1:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Month[/TD]
[TD]Student ID[/TD]
[TD]School1[/TD]
[TD]School2[/TD]
[TD]School3[/TD]
[TD]School4[/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]1234[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Feb[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mar[/TD]
[TD]1235[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Apr[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]May[/TD]
[TD]1236[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jun[/TD]
[TD]1237[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jul[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Later as step2, based on Student ID and corresponding school, we need to identify their corresponding month and value of E1 (for this example we have considered it as 4).
Case1:
For Student ID: 1234
Month: Jan,
School: School3
E1: 4
On sheet1 after mapping Jan and corresponding School3 value for month Jan, I need to add pocket money for next 4 months. i.e. pocket money of Jan, Feb, Mar, Apr will be added (i.e. 125, 75, 100, 125) and the sum (425) value will be inserted in Sheet3[row Jan; Column School3].
Case2:
ID: 1235
Month: Mar
School: School2
E1: 4
On sheet1 after mapping Mar and corresponding School2 value for month Mar, I need to add pocket money for next 4 months. i.e. pocket money of Mar, Apr, May, Jun will be added (i.e. 150, 100, 125, 150) and the sum (525) value will be inserted in Sheet3[row Mar; Column School2].
Case3:
ID: 1236
Month: May
School: School1
E1: 4
On sheet1 after mapping May and corresponding School1 value for month Mar, I need to add pocket money for next 4 months. i.e. pocket money of May, Jun, Jul, Aug. As we dont have August in Sheet1, so we add only May, Jun, Jul and he sum (i.e. 90 + 100 + 125= 315) value will be inserted in Sheet3[row May; Column School1].
Case4:
ID: 1237
Month: Jun
School: School4
E1: 4
On sheet1 after mapping Jun and corresponding School1 value for month Jun, I need to add pocket money for next 4 months. i.e. pocket money of Jun, Jun, Aug, Sep. As we dont have Aug and Sep in Sheet1, so we add only Jun, Jul and the sum (i.e. 100 + 125= 225) value will be inserted in Sheet3[row Jun; Column School4].
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Month[/TD]
[TD]Student ID[/TD]
[TD]School1[/TD]
[TD]School2[/TD]
[TD]School3[/TD]
[TD]School4[/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]1234[/TD]
[TD][/TD]
[TD][/TD]
[TD]425[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Feb[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mar[/TD]
[TD]1235[/TD]
[TD][/TD]
[TD]525[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Apr[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]May[/TD]
[TD]1236[/TD]
[TD]315[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jun[/TD]
[TD]1237[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]225[/TD]
[/TR]
[TR]
[TD]Jul[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance for all your help.
Cheers