Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have some data and i want to paste some excel code underneath each row

hsa05212:Pancreatic cancer              E2F2    E2F3    BCL2L1  ACVR1C  ACVR1B
hsa04910:Insulin signaling pathway      GRB2    PRKAG1  HK2     FOXO1   RPS6KB1
hsa04916:Melanogenesis                  WNT5A   ADCY1   GNAI3   ADCY6   EDN1
hsa04720:Long-term potentiation         ADCY1   PPP3R1  PRKX    KRAS    PLCB4

so that it looks like

hsa05212:Pancreatic cancer              E2F2    E2F3    BCL2L1  ACVR1C  ACVR1B
                                        4       6       3       2       1
                                        4       6       3       2       1
                                        4       6       3       2       1

hsa04910:Insulin signaling pathway      GRB2    PRKAG1  HK2     FOXO1   RPS6KB1
                                        4       6       3       2       1
                                        4       6       3       2       1
                                        4       6       3       2       1

hsa04916:Melanogenesis                  WNT5A   ADCY1   GNAI3   ADCY6   EDN1
                                        4       6       3       2       1
                                        4       6       3       2       1
                                        4       6       3       2       1

hsa04720:Long-term potentiation         ADCY1   PPP3R1  PRKX    KRAS    PLCB4
                                        4       6       3       2       1
                                        4       6       3       2       1
                                        4       6       3       2       1

The numbers are just to represent the excel code. I already have the code formatted, and i can just select each row individually and select "Insert Copied Cells" but it doesn't let me select multiple cells and then do the insert.

Is there an easier way of doing this?

thanks

share|improve this question
    
would you mind sharing your code too? you could i.e. do a copy loop, to solve this. Further, in order to suggest you an easier way, one would need to know where your numbers are comming from. –  Jook Oct 23 '12 at 13:03
    
What do you mean by code? Are you trying to paste VBA code into the cells? Or are you referring to formulas? –  CharlieRB Oct 23 '12 at 14:20
1  
oooh - sorry, bad habit - thought YOU ment VBA-Code with Insert Copied Cells -> forgot, that this is a menu-function too. Ok, then I just would like to know a bit more, how your data is organized. Do you have csv-file of data? xls-files? can you give an example? are there only those 4 headline you provided or are there more? –  Jook Oct 23 '12 at 16:39

1 Answer 1

Select range with blank row at the top, Subtotal with Replace current subtotals unchecked, Subtotal, Subtotal. Filter with Number Filters select 1, blank contents, key “4,6,3,2,1” in top row as appropriate, copy down, remove Filter, select all, Subtotal with “Remove All”.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.