Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Append two rows from report

I would like a macro to do the following:
I have two rows to concatenate
The first row has columns A through G
The second row has columns B through G
I would like to append the second row to the end of the first row starting
in column H. If Col C ='PER' append second row starting in column H of first
row

The are 1450 records to do this for.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Append two rows from report

Is the PER in the 1st or second row?

which column can I use to find the last row of data (B or C)?

"Bob Hopson" wrote:

I would like a macro to do the following:
I have two rows to concatenate
The first row has columns A through G
The second row has columns B through G
I would like to append the second row to the end of the first row starting
in column H. If Col C ='PER' append second row starting in column H of first
row

The are 1450 records to do this for.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default Append two rows from report

Hi Bob,

you don't need a macro. In cell H1 (assume row 1 is the first row) enter the
formula =IF($C1="Per",B2,"").
Copy this formula to the right as far as necessary.
Highlight H1:M2 and use the fill handle to fill down as far as necessary.
Highlight all the formula cells, say H1:M1450 and choose Copy, then choose
Edit, Paste Special, Values.

--
Cheers,
Shane Devenshire
Microsoft Excel MVP

"Bob Hopson" wrote:

I would like a macro to do the following:
I have two rows to concatenate
The first row has columns A through G
The second row has columns B through G
I would like to append the second row to the end of the first row starting
in column H. If Col C ='PER' append second row starting in column H of first
row

The are 1450 records to do this for.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Append two rows from report

Hi Joel,

In second row use column C

Thanks

Bob

"Joel" wrote:

Is the PER in the 1st or second row?

which column can I use to find the last row of data (B or C)?

"Bob Hopson" wrote:

I would like a macro to do the following:
I have two rows to concatenate
The first row has columns A through G
The second row has columns B through G
I would like to append the second row to the end of the first row starting
in column H. If Col C ='PER' append second row starting in column H of first
row

The are 1450 records to do this for.

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Append two rows from report

Thanks Shane. I'll try it and let you know how I make out.

Bob

"ShaneDevenshire" wrote:

Hi Bob,

you don't need a macro. In cell H1 (assume row 1 is the first row) enter the
formula =IF($C1="Per",B2,"").
Copy this formula to the right as far as necessary.
Highlight H1:M2 and use the fill handle to fill down as far as necessary.
Highlight all the formula cells, say H1:M1450 and choose Copy, then choose
Edit, Paste Special, Values.

--
Cheers,
Shane Devenshire
Microsoft Excel MVP

"Bob Hopson" wrote:

I would like a macro to do the following:
I have two rows to concatenate
The first row has columns A through G
The second row has columns B through G
I would like to append the second row to the end of the first row starting
in column H. If Col C ='PER' append second row starting in column H of first
row

The are 1450 records to do this for.

Thanks



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Append two rows from report

Hi Shane,

I tried your suggestion, but I am getting the send row appended to itself.
Here is my data. I need Row 2 columns appended to Row 1 starting Col G. Is
there a way to cut Row 2 and append to Row 1 when $A1="PER"

Row 1 - Col A - Barbara M.;Col B, C E - blank; Col D - 649711; Col F - 100018
Row 2 - Col A - PER; Cols B,C,D,E, F whatever


BARBARA M. 6469711 100018
PER 0 0 0 0 0


Thanks

Bob

"ShaneDevenshire" wrote:

Hi Bob,

you don't need a macro. In cell H1 (assume row 1 is the first row) enter the
formula =IF($C1="Per",B2,"").
Copy this formula to the right as far as necessary.
Highlight H1:M2 and use the fill handle to fill down as far as necessary.
Highlight all the formula cells, say H1:M1450 and choose Copy, then choose
Edit, Paste Special, Values.

--
Cheers,
Shane Devenshire
Microsoft Excel MVP

"Bob Hopson" wrote:

I would like a macro to do the following:
I have two rows to concatenate
The first row has columns A through G
The second row has columns B through G
I would like to append the second row to the end of the first row starting
in column H. If Col C ='PER' append second row starting in column H of first
row

The are 1450 records to do this for.

Thanks

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
Report duplicate rows [email protected] Excel Worksheet Functions 2 May 28th 08 08:55 AM
Macro that will Cut rows and then insert-copy or append rod Excel Discussion (Misc queries) 3 October 21st 06 04:50 PM
Automate Excel report to place certain data into existing report? Craig Harrison Excel Worksheet Functions 3 July 25th 06 01:54 PM
Add totals at end of the report with unknow number of rows with VB SITCFanTN New Users to Excel 3 June 4th 06 08:17 PM
Create a report with selected rows based on the content in a cell ThirdTim New Users to Excel 1 May 5th 05 05:18 PM


All times are GMT +1. The time now is 06:37 PM.

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

About Us

"It's about Microsoft Excel"