Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with a macro

I have a column of text only information in A1 thru A26, with a control
number in A27.
I want to copy A1 thru A26 to C1 and transpose that column (values only) to
that row.
Then I want to repeat that same copy (for the number of times that is
indicated in A27.
I would then like to go to the bottom of column C and and go down 4 rows
below the last row and put a formula that counts the numberof times that the
information in row 1 occurs in the rows below it.
And finally I would like to copy that formula across the rows for the
transposed information..

Each time I have tried to do this in a recorded macro I couldn't get it to
work, mostly because of the formula and the location of the bottom of the
row, which seems to go to the wrong place. I would appreciated any help and
thank you in advance.


Chuck C


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Need help with a macro

See excel.worksheet.functions

"Chuck" wrote in message ...
I have a column of text only information in A1 thru A26, with a control
number in A27.
I want to copy A1 thru A26 to C1 and transpose that column (values only) to
that row.
Then I want to repeat that same copy (for the number of times that is
indicated in A27.
I would then like to go to the bottom of column C and and go down 4 rows
below the last row and put a formula that counts the numberof times that the
information in row 1 occurs in the rows below it.
And finally I would like to copy that formula across the rows for the
transposed information..

Each time I have tried to do this in a recorded macro I couldn't get it to
work, mostly because of the formula and the location of the bottom of the
row, which seems to go to the wrong place. I would appreciated any help and
thank you in advance.


Chuck C




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Need help with a macro

chuck,
it appears to me that If you copy/transpose A1:A26 the number of times
indicated in A27 then the data in column C will not change, and therefore at
Cx the count of data in A1 will equal the value in A27.

But anyway:

Sub For_Chuck()
For counter = 1 To Range("A27").Value
Range("A1:A26").Copy
Range("C" & counter & ":AB" & counter).PasteSpecial Transpose:=True
Next counter

Range("C" & counter + 4).Select

Do Until ActiveCell.Column 28
For counter2 = 3 To 28
ActiveCell.FormulaR1C1 = "=countif(r1c" & counter2 & ":r" &
counter - 1 & "c" & counter2 & ",r" & counter2 - 2 & "c1)"
Next counter2
ActiveCell.Offset(0, 1).Select

Loop
End Sub


Steve


"Chuck" wrote in message
...
I have a column of text only information in A1 thru A26, with a control
number in A27.
I want to copy A1 thru A26 to C1 and transpose that column (values only)

to
that row.
Then I want to repeat that same copy (for the number of times that is
indicated in A27.
I would then like to go to the bottom of column C and and go down 4 rows
below the last row and put a formula that counts the numberof times that

the
information in row 1 occurs in the rows below it.
And finally I would like to copy that formula across the rows for the
transposed information..

Each time I have tried to do this in a recorded macro I couldn't get it to
work, mostly because of the formula and the location of the bottom of the
row, which seems to go to the wrong place. I would appreciated any help

and
thank you in advance.


Chuck C




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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
need help to update macro to office 2007 macro enabled workbook jatman Excel Discussion (Misc queries) 1 December 14th 07 01:57 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM


All times are GMT +1. The time now is 09:28 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"