Solved

Excel Help

Posted on 2013-01-23
6
320 Views
Last Modified: 2013-01-23
I have a large 5 Column 5 (A to E).  This file is 518K rows.  Column D is Blank.  What I need is a formula that would take the value in Column C and append 'Group 1' to it for first 1000 rows.  Then append 'Group 2' for next 1000 rows etc... So if Column C was 'Test' then Column D would be 'Test Group 1' for first 1000 Rows and 'Test Group 2 for next 1000 rows.  I don't want to manually do a concatenate. Somehow I need the logic to go by the row number.

I could also convert this to a TAB delimited text file and if a VB script could do it easier that's fine too.  Just need 4th column to contain the result.
0
Comment
Question by:elwayisgod
  • 3
  • 3
6 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 38810507
Is there only one value in column C to use?

If not, then when do you go to next value in C?
0
 
LVL 23

Expert Comment

by:NBVC
ID: 38810524
If you are saying that C2 has "TEST" and C3 has "OTHER", then you want 1000 TEST Group 1 and 1000 Other Group 2, etc.. then try.

=INDEX(C:C,MOD(INT((ROW()-ROW($C$1))/1000),1000)+2)&" GROUP "&MOD(INT((ROW()-ROW($C$1))/1000),1000)+1

copied down.

Otherwise, please elaborate.
0
 

Author Comment

by:elwayisgod
ID: 38810585
No the value changes in Column C.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:elwayisgod
ID: 38810610
NB_VC,

Not what I'm saying.   To clarify.  Column C has two text values in it.  It has 'Test' for first 458,250 Rows.  It has 'Test2' in it for remaining Rows 458,251 to 518,375.  

Column D needs to break these into groups of 1000 by appending 'Group 1' for first 1000 rows, Group 2 for next 1000 rows etc......

That help?
0
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 38810640
So then assuming first text in C1, try:

=C1&" GROUP"&MOD(INT((ROW()-ROW($C$1))/1000),1000)+1

copied down

Is that it?
0
 

Author Closing Comment

by:elwayisgod
ID: 38811097
Perfect!!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now