Spreadsheet: 288334d1389162031-how-to-repeat-same-values-latha-m
Sheet: Sheet1

item | cost |  | Expected output
1001 | 5 |  | 1001 | 5
1002 | 10 |  | 1002 | 10
1003 | 48 |  | 1003 | 48
1004 | 25 |  | 1004 | 25
1005 | 35 |  | 1005 | 35
1006 | 5 |  | 1006 | 5
1007 | 8 |  | 1007 | 8
1008 | 9 |  | 1008 | 9
1009 | 7 |  | 1009 | 7
1010 | 6 |  | 1010 | 6
1011 | 7 |  | 1011 | 7
1012 | 74 |  | 1012 | 74
1013 | 4 |  | 1013 | 4
1014 | 4 |  | 1014 | 4
1015 | 4 |  | 1015 | 4
1016 | 5 |  | 1016 | 5
1017 | 4 |  | 1017 | 4
1018 | 4 |  | 1018 | 4
1019 | 4 |  | 1019 | 4
1020 | 5 |  | 1020 | 5
1021 | 8 |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8
 |  |  | 1001 | 5
 |  |  | 1002 | 10
 |  |  | 1003 | 48
 |  |  | 1004 | 25
 |  |  | 1005 | 35
 |  |  | 1006 | 5
 |  |  | 1007 | 8
 |  |  | 1008 | 9
 |  |  | 1009 | 7
 |  |  | 1010 | 6
 |  |  | 1011 | 7
 |  |  | 1012 | 74
 |  |  | 1013 | 4
 |  |  | 1014 | 4
 |  |  | 1015 | 4
 |  |  | 1016 | 5
 |  |  | 1017 | 4
 |  |  | 1018 | 4
 |  |  | 1019 | 4
 |  |  | 1020 | 5
 |  |  | 1021 | 8