UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> New Value, Office 2013    
 
   
jokeme71
post Mar 27 2019, 03:27 PM
Post#1



Posts: 926
Joined: 7-June 02
From: Maryland


I am trying to have a file name populated in a cell for each row. I want a file name to be created and incremented by 1 every 25th row. So each file name would have 25 rows of data. Any help would be greatly appreciated.
Go to the top of the page
 
MadPiet
post Mar 27 2019, 03:46 PM
Post#2



Posts: 3,171
Joined: 27-February 09



What's the Excel equivalent of MOD()? (remainder).

In T-SQL it's (x % 25) + 1
then you'd get sequences of 1 to 25 and it would start over at 1 on 26, 51, etc.
Go to the top of the page
 
jokeme71
post Mar 27 2019, 04:17 PM
Post#3



Posts: 926
Joined: 7-June 02
From: Maryland


=INT((ROW(J1)-1)/25)+1 does the trick very nicely. How would I adapt this to restart every time a value in column J changes?
Go to the top of the page
 
jokeme71
post Mar 27 2019, 05:11 PM
Post#4



Posts: 926
Joined: 7-June 02
From: Maryland


I was able to accomplish this by adding a helper column (Column K) that contained a sequential number for each row that matched the data in column J. Then I modified the formula to look at the sequential number instead of the row as follows: =INT((K1-1)/25)+1
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    23rd July 2019 - 08:18 AM