Can you upload the excel spreadsheet, might be a way to fix your problem when importing instead of fixing it using SQL? However, Update Sheet1 Set Response = Response + (Select Response from Sheet1 where question is null and id = id + 1); I don't know much about SQL but wouldn't you have to specify which response you are changing? int ID_TO_ALTER_PLUS1; ID_TO_ALTER_PLUS1 = SELECT id from Sheet1 WHERE question IS null LIMIT 1; UPDATE Sheet1 Set response = (SELECT response from Sheet1 WHERE id = ID_TO_ALTER_PLUS1 - 1) + (SELECT response from Sheet1 WHERE id = ID_TO_ALTER) WHERE id = ID_TO_ALTER_PLUS1 -1; DELETE from Sheet1 WHERE id = ID_TO_ALTER_PLUS1; So, UPDATE Sheet1 Set response = (SELECT response from Sheet1 WHERE id = ((SELECT id from Sheet1 WHERE question IS null LIMIT 1) -1) + (SELECT response from Sheet1 WHERE id = (SELECT id from Sheet1 WHERE question IS null LIMIT 1))) WHERE id = ((SELECT id from Sheet1 WHERE question IS null LIMIT 1) - 1); DELETE from Sheet1 WHERE question IS null LIMIT 1; Run these one after the other to update one record at a time Obviously syntax is going to be wrong because I don't actually know SQL, but you get the idea?