Solved

Excel Help

Posted on 2013-01-23
6
319 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
Comment Utility
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
Comment Utility
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
Comment Utility
No the value changes in Column C.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:elwayisgod
Comment Utility
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
Comment Utility
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
Comment Utility
Perfect!!!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

763 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

10 Experts available now in Live!

Get 1:1 Help Now