Forums

General Betting

There is currently 1 person viewing this thread.
dogform
05 Nov 14 11:27
Joined:
Date Joined: 02 Mar 01
| Topic/replies: 67 | Blogger: dogform's blog
Would any of the excel gurus please be able to help me with a macro to run in an excel 2010 workbook?

I wish to create a macro that checks the worksheet to the immediate left of the worksheet with the macro in it and looks for a text string in the cells of a column. When it finds the precise text string, it copies the row containing the text string to the worksheet containing the macro. There will be more than one row to be copied, it needs to copy all relevant rows. In the worksheet with the macro that receives the copied rows, the copy should start at row 30

For example, sheet named "Week45" contains 5 columns and 200 rows with data. One of the columns is labelled "Status" and contains text values such as "Follow", "Discard". The sheet to the immediate right is named "Week46" and it contains the macro. When the macro is activated it checks "week45" and copies all rows to "Sheet46" where the text value in the "Status" column is equal to "Follow". The copied data is placed in row 30 onwards in the sheet "Week46"

I will be creating new sheets as the weeks evolve so need the sheet names not to be hard coded in the macro, ie, not containing the tab name but some other method to reference the sheet containing the data to be copied. I could set it all up manually by creating 52 sheets and setting up lots of macros by recording keystrokes and using "Auto Filter" to select the rows, however, it is a bit clunky and not very flexible. I hope the details are clear enough, any help most appreciated.

Thx

Post your reply

Text Format: Table: Smilies:
Forum does not support HTML
Insert Photo
Cancel
sort by:
Show
per page
Replies: 3
By:
lumponlarge
When: 07 Nov 14 20:08
I could write this for you ... how much will you be prepared to pay ?
By:
dogform
When: 14 Nov 14 22:24
Sorted it out using ActiveSheet.Previous and ActiveSheet.Next
By:
lumponlarge
When: 16 Nov 14 16:09
dogo, is there any end to your talents ? Well done indeed sir.
sort by:
Show
per page

Post your reply

Text Format: Table: Smilies:
Forum does not support HTML
Insert Photo
Cancel
‹ back to topics
www.betfair.com