Adding an Index Number If

hatstand

Well-known Member
Joined
Mar 17, 2005
Messages
778
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

I have imported a csv file that is many files added together. So every time the data changes to a new file its says “File1” in one of the columns. What I am trying to do is add a column that adds an index to these names, so I can then do a Fill up and Down. This would give each file the same index number which I can use in Pivots etc.

Any ideas, I feel like I’m so close but can’t quite get it.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
If you don't need them to be sequential (just the same for each file), you could add an index column as normal, then add another column that returns the index number if there is "File1"in the relevant column, or null otherwise. Then Fill down that new column.
 
Upvote 0
Thanks. I was thinking about that. Ideally it would be sequential so I could give them names. I have managed to get something working using 'List.Sum(List.FirstN(#"Added Index"[Number],[Index]))'. Unfortunately it is very very slow. But I think I'm going in the right direction. Cheers.
 
Upvote 0

Forum statistics

Threads
1,223,740
Messages
6,174,223
Members
452,552
Latest member
Kleets

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