code to get students marks from source sheet to destination sheet.

rzml

New Member
Joined
Dec 24, 2020
Messages
26
Office Version
  1. 2016
Platform
  1. Windows
hi,
I am looking for a VBA code that can get student marks using his ID and evaluation type (as headers) from source sheet to destination sheet. I am hoping that it would be vlookup with an input box (since the evaluation type and student will change).

1609309143812.png
1609309222548.png


Thanks
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Saurabhj

Board Regular
Joined
Jun 6, 2020
Messages
127
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi rzml,

Kindly share the sheet having data.

Thanks,
Saurabh
 

rzml

New Member
Joined
Dec 24, 2020
Messages
26
Office Version
  1. 2016
Platform
  1. Windows
Hi rzml,

Kindly share the sheet having data.

Thanks,
Saurabh
IDsectionQuiz (10%)Mid (20%)Assi (10%)
201420031
61​
7.3128.4
201510186
61​
7.3138.5
201510526
61​
5.278.5
201610299
61​
4.698.5
201611256
61​
7.5118.9
201720041
61​
9.6179.9
201720044
61​
7.2158.5
201720048
61​
6.670
201720343
61​
6.1127.2
201810012
61​
6.41110
201810028
61​
10.01910
201810032
61​
7.769.6
201810042
61​
7.0107.9
201810108
61​
10.01910
201810118
61​
7.5127.9
201810154
61​
8.0138.8
201810190
61​
9.62010
201810232
61​
8.01510
201810240
61​
8.8199.6
201810262
61​
7.6159.6
201810271
61​
7.61110
201810305
61​
8.0139.5
201810374
61​
5.71010
201810526
61​
7.6169.6
201810560
61​
6.8158.8
201810619
61​
7.5148.6
201810637
61​
7.11610
201810757
61​
8.078.8
201810761
61​
5.277.2
201810863
61​
7.3138.6
201210441
62​
0.000
201210997
62​
6.4179.9
201610115
62​
5.2108.9
201620564
62​
6.0108.5
201710022
62​
6.6137.4
201710074
62​
6.8167.4
201710088
62​
5.588.5
201810087
62​
10.0179.5
201810090
62​
5.7108.5
201810180
62​
4.379.9
201810312
62​
8.0129.6
201820383
62​
6.1139.6
201820477
62​
6.0137.8
201911208
62​
8.41410


I apologise don't know how to share the sheet
 

rzml

New Member
Joined
Dec 24, 2020
Messages
26
Office Version
  1. 2016
Platform
  1. Windows
IDsectionQuiz (10%)Mid (20%)
20142003161
20151018661
20151052661
20161029961
20161125661
20172004161
20172004461
20172004861
20172034361
20181001261
20181002861
20181003261
20181004261
20181010861
20181011861
20181015461
20181019061
20181023261
20181024061
20181026261
20181027161
20181030561
20181037461
20181052661
20181056061
20181061961
20181063761
20181075761
20181076161
20181086361
20121044162
20121099762
20161011562
20162056462
20171002262
20171007462
20171008862
20181008762
20181009062
20181018062
20181031262
20182038362
20182047762
20191120862
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
861
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows

ADVERTISEMENT

Are you want to input student ID at Input Box and then VBA or Vlookup return other data based it
For Vlookup:
Excel Formula:
=VLOOKUP(A2,Sheet1!$A$1:$E$25,2,FALSE)

Change Sheet1!$A$1:$E$25 to your Source Range Address at sheet1
Change 2 to column of result you want for each column
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
861
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
You can Use XL2BB ADDIN for sharing. I think it is better to you write All of your ID that you need result for them At Column A and then Run Macro Once. Otherwise for Each Input ID you should Macro One Time to Get ID from InputBox.
 

rzml

New Member
Joined
Dec 24, 2020
Messages
26
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

Book1.xlsx
ABCDEFGHIJK
1ID sectionQuiz (10%)Mid (20%)Assi (10%)Lab (14%)Tut (6%)Total 40%Total 60%Final E40%Total
2201420031617.3128.413533.67462873
3201510186617.3138.512.54.532.77452975
4201510526615.278.58526.7342356
5201610299614.698.512.5429.56391756
6201611256617.5118.97528.4401858
7201720041619.6179.913638.5553691
8201720044617.2158.5135.534.2502676
9201720048616.67012.54.523.6311748
10201720343616.1127.29.5628.84412667
11201810012616.4111012.54.533.4442771
122018100286110.0191013639583997
13201810032617.769.613535.33422163
14201810042617.0107.910.5429.36402262
152018101086110.0191012.5638.5573794
16201810118617.5127.984.527.9402969
17201810154618.0138.812.55.534.8483078
18201810190619.6201013638.6584098
19201810232618.0151013536513586
20201810240618.8199.613637.4573794
21201810262617.6159.613535.2502979
22201810271617.6111011.54.533.6453276
23201810305618.0139.59430.5443376
24201810374615.71010134.533.18432467
25201810526617.6169.6135.535.7523183
26201810560616.8158.8135.534.1493281
27201810619617.5148.612.5533.6483179
28201810637617.1161013535.05513283
29201810757618.078.812.5635.25422668
30201810761615.277.29425.43322254
31201810863617.3138.6134.533.37462874
32201210441620.000000000
33201210997626.4179.99631.3483382
34201610115625.2108.912.5430.63402363
35201620564626.0108.53421.5311749
36201710022626.6137.410.54.528.96421759
37201710074626.8167.413532.2482674
38201710088625.588.510.54.528.95372158
392018100876210.0179.514639.5573693
40201810090625.7108.511.54.530.18401959
41201810180624.379.9144.532.72402060
42201810312628.0129.613535.6483482
43201820383626.1139.6135.534.24472774
44201820477626.0137.80013.8272047
45201911208628.4141013637.4523182
Sheet1




this is the source


Book1.xlsx
ABCD
1ID sectionQuiz (10%)Mid (20%)
220142003161
320151018661
420151052661
520161029961
620161125661
720172004161
820172004461
920172004861
1020172034361
1120181001261
1220181002861
1320181003261
1420181004261
1520181010861
1620181011861
1720181015461
1820181019061
1920181023261
2020181024061
2120181026261
2220181027161
2320181030561
2420181037461
2520181052661
2620181056061
2720181061961
2820181063761
2920181075761
3020181076161
3120181086361
3220121044162
3320121099762
3420161011562
3520162056462
3620171002262
3720171007462
3820171008862
3920181008762
4020181009062
4120181018062
4220181031262
4320182038362
4420182047762
4520191120862
Sheet2




this is the destination
 

rzml

New Member
Joined
Dec 24, 2020
Messages
26
Office Version
  1. 2016
Platform
  1. Windows
You can Use XL2BB ADDIN for sharing. I think it is better to you write All of your ID that you need result for them At Column A and then Run Macro Once. Otherwise for Each Input ID you should Macro One Time to Get ID from InputBox.
thanks
 

rzml

New Member
Joined
Dec 24, 2020
Messages
26
Office Version
  1. 2016
Platform
  1. Windows
Are you want to input student ID at Input Box and then VBA or Vlookup return other data based it
For Vlookup:
Excel Formula:
=VLOOKUP(A2,Sheet1!$A$1:$E$25,2,FALSE)

Change Sheet1!$A$1:$E$25 to your Source Range Address at sheet1
Change 2 to column of result you want for each column
was hoping to enter vlookup value is VBA made input box, it will continue to fetch the marks until there are no longer ID.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,174
Messages
5,570,684
Members
412,336
Latest member
Tiffany927
Top