You are here:

Excel/Repeat each row specific times

Advertisement


Question
QUESTION: On sheet 1
Data, Index 1, Index 2
Apple, 3, 5
Orange, 6, 9

On sheet 2
Data, Index 1, Index 2
Apple, 3, 5
Apple, 4, 5
Apple, 5, 5
Orange, 6, 9
Orange, 7, 9
Orange, 8, 9
Orange, 9, 9

Hi Bill
I want to repeat row for a specific time, an example is as above.
I tried to use a combination of indirect/offset/address however I couldn't success.
Could you please help me?

Thanks in advance

ANSWER: Sorry, I don't understand what you wnt

---------- FOLLOW-UP ----------

QUESTION: Hi Bill

I mean, for example the first row, Apple have two index number 3 and 5, I want them to repeat as:
Apple 3
Apple 4
Apple 5
Similar to orange have index number 6 and 9, I want them to repeat as:
Orange 6
Orange 7
Orange 8
Orange 9
in another sheet, all by formula.
Whenever the content on sheet 1 change, the repeated row on sheet 2 automatically update as well.

Hope I explained clear this time.

Sorry for confusion

ANSWER: I understand now and a formula based solution will not work.  You will need a macro

---------- FOLLOW-UP ----------

QUESTION: Hi Bill
Thanks for your reply.
Would you be able to help me with the macro?
Thank you in advance

Answer
You're welcome.

Yes, I can write the macro, for a small fee of $50.  This site allows me to charge a nominal fee for writing macros.  If you still want to use me then I will need more details about the data (what column it is is, what column the output needs to be, sheet names for both, etc.)

Bill
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bill

Expertise

I can provide help with most all EXCEL questions and most all questions about writing EXCEL macros. I have been developing macros for about 10 years in EXCEL and have switched to it from Lotus 1-2-3 after about 10 years of writing macros in it. Typically, I will not write a macro for you unless it is very short because of all the details a macro has to know about to work every time and all the time are rarely provided. If I am not given ALL the details, circumstances, and situations then a "good" macro can not be written. Please understand that I do not know it all and will be the first to say so. As politely as possible, I don't write macros for people on this site who need one, want one, seem to imply that they need one, and/or seem to think I am expected to write one UNLESS they are very short, quick, and simple. 99% of all macros are more involved than what you think and rarely am I provided with enough specific and complete details to have the code work the first time and every time. This typically means too many follow-up emails, and subsequent macro changes due to lack of specific details, just to get those details so that the macro would work, all of which is on my own free time. The voice of experience from responding to many questions from people who ask me to write a macro for them from this site tells me this. I don't mean to come across as unhelpful but macros are usually very specific and without ALL of the specifics the macro I would write will not address all of your needs and the layout, location, formatting, conditions, etc. of your data and any related files the macro would have to work with. What seems like a simple task to you is almost always more involved than what you think to have the macro ALWAYS work in EVERY situation. If you have a macro you have already written and have a question about it then perhaps I could help with that. I am sure and hope you can and do understand.

©2016 About.com. All rights reserved.