Duplicating Cell Information

S

someone

I have a spreadsheet with a long list of information. I would like to
know if there is a easy way of inserting rows in between the
information and at the same time duplicating the previous cell
information into the new row. Something like this:

Current
A B C D
1 ID Name BE_No_Of_TX W_No_Of_TX
2 748 FinanceABC 56.00 102.00
3 4999 CashABC -658.00 -71.00
4 5026 ABCCash -7.00 0.00
5 5032 CashForABC -2272.00 -2056.00
6 5061 WorldABC -8.00 14.00
7 5065 FoxABC -380.00 -916.00

New
A B C D
1 ID Name BE_No_Of_TX W_No_Of_TX
2 748 FinanceABC 56.00 102.00
3 748 FinanceABC 56.00 102.00
4 4999 CashABC -658.00 -71.00
5 4999 CashABC -658.00 -71.00
6 5026 ABCCash -7.00 0.00
7 5026 ABCCash -7.00 0.00
8 5032 CashForABC -2272.00 -2056.00
9 5032 CashForABC -2272.00 -2056.00
10 5061 WorldABC -8.00 14.00
11 5061 WorldABC -8.00 14.00
12 5065 FoxABC -380.00 -916.00
13 5065 FoxABC -380.00 -916.00

I have various lists which I need to this with so I think somekind of
macro will do.

TIA

JK
 
N

Naomi

Again this is programming rather than functions...

Dim i,id as integer
i = 5 (the row where your values begin)
id=i (used for the id column)

Do until cells(i,1).value = ""
Rows(i).select
with selection
.Copy
.Insert Shift:=xlDown
end with
cells(i,1)=(i-id)+1
cells(i+1,1)=(i-id)+2
i = i+2
loop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top