Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default Duplicating Cell Information

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



  #2   Report Post  
Naomi
 
Posts: n/a
Default

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





" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
transfering information from one cell to another garr Excel Worksheet Functions 8 February 21st 05 01:28 AM
Transfering information to the next free cell in a column Chaudfeu Excel Discussion (Misc queries) 1 February 19th 05 07:18 PM
store some of the information from one cell into another bsantona Excel Discussion (Misc queries) 1 February 10th 05 02:35 PM
List ? - How do I make information in one cell determine list to u Brad_A Excel Worksheet Functions 1 January 18th 05 04:10 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 05:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"