Update Cells via External CSV File

Ka001

New Member
Joined
Nov 16, 2023
Messages
11
Office Version
  1. 2013
  2. 2011
  3. 2010
Platform
  1. Windows
I am using Excel 2013. I have a file of golfers' names, handicaps and previous weekly scores in a file - 90 names in the file. Rather than updating the file manually I now get CSV file which I can use to update my own file. The CSV file is in Rank order whereas my file is in alphabetic order. I would like to be able to extract data from the CSV file to update my file but leave my file in alphabetic order and highlight the cells in my file according to the Place the player achieved.
In the attached sample I have the CSV data, columns with my current file data and columns that I would like to end up with as a result of the CSV feed.
I have tried all sorts of functions and combinations but can't get it to work. Hopefully someone can help.
Thanks

Update Cells via External CSV File.xlsx
ABCDEFGHIJKLMNOP
1CSV Feed from External AppPrevious ScoresNew Scores Updated via External App
2
3PlaceSurnameInitialCountbackPtsPHPlayerHandicapScorePlayerHandicapScoreCountbackPlace
41KennyM2713Allen M1519Allen M1519
52GannonJLast Nine Holes2618Carroll A1014Carroll A1014
63BerginPLast Nine Holes2614Conway P2719Conway P2719
74HigginsD2611Bergin P1417Bergin P1426Last Nine Holes3
85MaddenW2513Dempsey L2315Dempsey L2315
96HarringtonDLast Nine Holes2418Devery K2115Devery K2115
10Donnelly M2415Donnelly M2415
11Duggan M423Duggan M423
12Duggan S1215Duggan S1215
13Fitzpatrick G1614Fitzpatrick G1614
14Flynn P2218Flynn P2218
15Gannon J1818Gannon J1826Last Nine Holes2
16Goff H10Goff H10
17Gorman L1620Gorman L1620
18Grealy J32Grealy J32
19Grehan G1214Grehan G1214
20Harrington D1822Harrington D1824Last Nine Holes6
21Higgins D1022Higgins D11264
22Hurley K6Hurley K6
23Kehily F27Kehily F27
24Kenneally M2724Kenneally M2724
25Kenny M1220Kenny M13201
26Kierans G2116Kierans G2116
27Madden W1325Madden W13255
28McDermott F2516McDermott F2516
29McNally G1814McNally G1814
30Moran G14Moran G14
Competition Report (2)
 
Last edited:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
If I understand correctly, you would like to click a button, select the correct csv file, dump the csv file data into columns A thru F. Then match up the surname and initial form the csv file to the player name that is in column L, and write the correct data into columns M thru P.

am i missing anything?
 
Upvote 0
If I understand correctly, you would like to click a button, select the correct csv file, dump the csv file data into columns A thru F. Then match up the surname and initial form the csv file to the player name that is in column L, and write the correct data into columns M thru P.

am i missing anything?
Thanks you for your offer to help.
Horefully the attached will explain what I am trying to achieve.

CSV to Tuesdays Format.xlsx
ABCDEFGHIJKLMNOP
1
2CSV Feed from External Rolf Club AppPrevious Rolf Society PataNew Petails Updated via External App
3PlayerH/CScorePlaceCountbackMemberHandicapCurrent BonusMemberHandicapAdjusted ScorePlaceCountbackNew Bonus
4Kenny B13271.0Last three HolesAllen B151.0Allen B15 1.0
5Gannon L17262Last Nine HolesCarroll A100.5Carroll A100.5
6Bergin R15263Last Six HolesConway R270.5Conway R270.5
7Higgins P11264Bergin R142.0Bergin R1528.01.0Last Six Holes-2.0
8Grehan R13255Dempsey L23-1.0Dempsey L23-1.0
9Harrington P18246Last Nine HolesDevery W210.5Devery W210.5
10Fitzpatrick R16227Last Nine HolesDonnelly B240.5Donnelly B240.5
11Duggan B41.0Duggan B41.0
12Duggan S121.0Duggan S121.0
13Fitzpatrick R161.0Fitzpatrick R1623.007Last Nine Holes1.5
14Flynn R221.0Flynn R221.0
15Gannon L181.0Gannon L1727.02Last Nine Holes-2.0
16Goff H10-3.0Goff H10-3.0
17Gorman L161.0Gorman L161.0
18Grealy L221.0Grealy L221.0
19Grehan R121.0Grehan R1226.05
20Harrington P193.0Harrington P1827.03Last Nine Holes1.0
21Higgins P101.0Higgins P1127.04 0.0
22Hurley W61.0Hurley W61.0
23Kehily F191.0Kehily F191.0
24Kenneally B201.0Kenneally B201.0
25Kenny B12-3.0Kenny B13246 -2.5
26Kierans R211.0Kierans R211.0
27Madden W131.0Madden W131.0
28McDermott F150.5McDermott F150.5
29McNally R180.5McNally R180.5
30Moran R140.5Moran R140.5
31
32Purpose :-
33To use input from a Golf Club CSV file to update a Golf Society competition data on a weekly basis. My example is for one week
34
35Overall requirements:-
36
37To check who played, what their Club Handicap is, what place they finished in - these are taken from the CSV data
38
39The Golf Society competition rules
40
41Each time a member plays in a competition he gets a bonus of 0.5 points
42If a member does not play in a competition his "score" will remain blank and his bonus will be the same as his "Previous Scores" bonus.
43
44The Winner of the competition will receive a prize but he will incur a penalty of 4 (bonus) points - applied to his bonuses for the coming week
45
462nd place in the competition will receive a prize, but he will incur a penalty of 3 (bonus) points - applied to his bonuses for the coming week
47
483rd place in the competition will receive a prize, but he will incur a penalty of 2 (bonus) points - applied to his bonuses for the coming week
49
504th place in the competition will receive a prize, but he will incur a penalty of 1 (bonus) point - applied to his bonuses for the coming week
51
525th place in the competition will receive a prize, but he will incur a penalty of 1 (bonus) point - applied to his bonuses for the coming week
53
54The winner and places for the Golf Society competition are determined by adding their current bonus to their competition score (from the CSV file).
55
56The members who played will have their handicap updated from their CSV file handicap.
57Any member who did not play will retain their current handicap - from "the previous scores" list.
58
59The Golf Society Member names will be updates on an annual basis - i.e. it will remain static for the playing season.
60The number of players (from the CSV data) will change according to the numbers who play in a competition.
61
62Steps involved in updating the Golf Society data :-
63
64Import the CSV file data
65
66Match the CSV player name with the "New Details" member name
67Update the Adjusted Score i.e. CSV score + the Current Bonus. The Adjusted score will be blank if the member didn't play.
68
69I have done the updates to the spreadsheet manually to highlight the changes to be automated.
Scores Update (2)
Cell Formulas
RangeFormula
M4M4=IF(LOOKUP(A4,K4:K30,A4)=K4,B4," ")
N4N4=IF(LOOKUP(A4,K4:K30,K4)=K4,D4," ")
O4O4=IF(LOOKUP(A4,K4:K30,K4)=K4,E4," ")
M7M7=C6+I7
O7,L7O7=E6
L26:L30,L22:L24,L16:L18,L14,L8:L12,L4:L6L4=H4
M13M13=C10+I13
O13O13=E10
M15M15=C5+I15
O15,L15O15=E5
P26:P30,P22:P24,P16:P18,P14,P8:P12,P4:P6P4=I4
P7P7=I7-4
P13,P25P13=I13+0.5
P15P15=I15-3
L20,O20L20=B9
M19:M20M19=C8+I19
M21M21=C7+I21
M25M25=C4+I25
P20P20=I20-2
P21P21=I21-1
 
Upvote 0
If I understand correctly, you would like to click a button, select the correct csv file, dump the csv file data into columns A thru F. Then match up the surname and initial form the csv file to the player name that is in column L, and write the correct data into columns M thru P.

am i missing anything?
You understand correctly what I am trying to achieve. To help you get a clearer picture I manually imported the data from a csv file to illustrate the issues that I am having - i.e. trying to populate columns M to P with the correct data from the other columns. If I could automate the import of the csv file as well, that would be great.
Thank you.
 
Upvote 0
I have the data importing just from from the csv file.

let focus on just Kenny B,
1. Column L: his previous handicap was 12 (cells H25) write the new handicap of 13 from the import and write to cell L25.
2. Column M: (Adjusted store) is new score from import of 27, Plus current bonus of negative 3.
3. Column O: Countback is just copied straight form the import file.

4. Column N: Not sure how you got 6 when the csv file has 1
5. Column P: how did you get the negative 2.5 ????

let me know
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top