Hi all,
I have a pivot table that is connected to a database via odbc and I have vb auto-updating the pivot table and saving the file as a new format each day. The new data is inserted as either new rows at the end of the table or inside the pivot table. Each row must have a unique id that I would like to look like where it says SIN:
Capture.PNG
I'm currently using the =ROW() formula to do this but when the pivot table updates and adds rows, the numbers do not increment because the =ROW() function does not carry to the new rows. Preferably, I'd like to have the string SINxxxx in the SIN column where, xxxx is the unique number ID. If I put =ROW() in the pivot table as a calculated field, the new rows will update with a number but every row is equal to 1 which isn't right. I can't edit the database I am connected to and I've tried to modify the file after saving it into another sheet/excel book but my save method just overwrites my changes every night with new data and therefore doesn't keep the formatting.
Anyone have any idea how to increment numbers on new row insertion in a pivot table? Thanks!
Bookmarks