Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Is a macro possible here?


I own a small company where my we get inquiries on a daily business
and we open the .csv files with rows like the following. An employee
places each in individual worksheets in one workbook (normally there
are approx. 12 rows of information):

A B
1 Information Input Column
2 Inquirer John Doe
3 Phone Number 123-123-1234
4 Email

We have 80-100 worksheets in one document at the end of the month.

My database is the first worksheet in the workbook, called
DBworksheet, followed by the 80-100 individual worksheets of
inquiries.

The header of the DBworksheet is:

INQUIRER STNUMBER STNAME CITY
STATE ZIP

The first inquiry worksheet, which is the second worksheet has a tab
titled Doe_John

To populate the first row under the header with the information of the
Doe_John worksheet, I have the formulas:

=Doe_John!$B$2 =Doe_John!$B$3 =Doe_John!$B$4

As of now, I am scrolling down and filling the number of rows with the
number of worksheets I have and manually doing a repair/replace in the
function.

For instance, the 2nd inquiry worksheet is Smith_Joyce. After using
fill I highlight the copied Doe_John row and find/replace by:

Find: Doe_John
Replace: Smith_Joyce

Each function with Doe_John is replaced with Smith_Joyce:

=Smith_Joyce!$B$2 =Smith_Joyce!$B$3 =Smith_Joyce!$B$4

My row after John Doe is populated now with Joyce Smith.

Is there a way I can create a macro that counts how many inqury
worksheets I have, fills the rows and then does a find/replace based
on each tab name so I don't have to do it manually?

Thanks,

Dan
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 461
Default Is a macro possible here?

Can you explain why exactly you are creating 60+ worksheets with 1 worksheet
per person?

"Dan" wrote:


I own a small company where my we get inquiries on a daily business
and we open the .csv files with rows like the following. An employee
places each in individual worksheets in one workbook (normally there
are approx. 12 rows of information):

A B
1 Information Input Column
2 Inquirer John Doe
3 Phone Number 123-123-1234
4 Email

We have 80-100 worksheets in one document at the end of the month.

My database is the first worksheet in the workbook, called
DBworksheet, followed by the 80-100 individual worksheets of
inquiries.

The header of the DBworksheet is:

INQUIRER STNUMBER STNAME CITY
STATE ZIP

The first inquiry worksheet, which is the second worksheet has a tab
titled Doe_John

To populate the first row under the header with the information of the
Doe_John worksheet, I have the formulas:

=Doe_John!$B$2 =Doe_John!$B$3 =Doe_John!$B$4

As of now, I am scrolling down and filling the number of rows with the
number of worksheets I have and manually doing a repair/replace in the
function.

For instance, the 2nd inquiry worksheet is Smith_Joyce. After using
fill I highlight the copied Doe_John row and find/replace by:

Find: Doe_John
Replace: Smith_Joyce

Each function with Doe_John is replaced with Smith_Joyce:

=Smith_Joyce!$B$2 =Smith_Joyce!$B$3 =Smith_Joyce!$B$4

My row after John Doe is populated now with Joyce Smith.

Is there a way I can create a macro that counts how many inqury
worksheets I have, fills the rows and then does a find/replace based
on each tab name so I don't have to do it manually?

Thanks,

Dan

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Is a macro possible here?

I created formulas like you did in the example. You can also hard copy the
value into the DBworksheet. I did only three rows of data, you can add up to
the 10 rows as needed.


Sub create_db()

RowCount = 1
For Each sht In ThisWorkbook.Sheets
If sht.Name < "DBworksheet" Then
With Sheets("DBworksheet")
.Range("A" & RowCount).Formula = _
"=" & sht.Name & "!$B$2"
.Range("B" & RowCount).Formula = _
"=" & sht.Name & "!$B$3"
.Range("C" & RowCount).Formula = _
"=" & sht.Name & "!$B$4"
End With
RowCount = RowCount + 1
End If
next sht
End Sub


"Dan" wrote:


I own a small company where my we get inquiries on a daily business
and we open the .csv files with rows like the following. An employee
places each in individual worksheets in one workbook (normally there
are approx. 12 rows of information):

A B
1 Information Input Column
2 Inquirer John Doe
3 Phone Number 123-123-1234
4 Email

We have 80-100 worksheets in one document at the end of the month.

My database is the first worksheet in the workbook, called
DBworksheet, followed by the 80-100 individual worksheets of
inquiries.

The header of the DBworksheet is:

INQUIRER STNUMBER STNAME CITY
STATE ZIP

The first inquiry worksheet, which is the second worksheet has a tab
titled Doe_John

To populate the first row under the header with the information of the
Doe_John worksheet, I have the formulas:

=Doe_John!$B$2 =Doe_John!$B$3 =Doe_John!$B$4

As of now, I am scrolling down and filling the number of rows with the
number of worksheets I have and manually doing a repair/replace in the
function.

For instance, the 2nd inquiry worksheet is Smith_Joyce. After using
fill I highlight the copied Doe_John row and find/replace by:

Find: Doe_John
Replace: Smith_Joyce

Each function with Doe_John is replaced with Smith_Joyce:

=Smith_Joyce!$B$2 =Smith_Joyce!$B$3 =Smith_Joyce!$B$4

My row after John Doe is populated now with Joyce Smith.

Is there a way I can create a macro that counts how many inqury
worksheets I have, fills the rows and then does a find/replace based
on each tab name so I don't have to do it manually?

Thanks,

Dan

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Is a macro possible here?

Right or wrong, that's how the web-form returns and the process
evolved.

Further, that is how we start our account paperwork, printing each one
is our cover.


On Tue, 1 Apr 2008 22:56:02 -0700, akphidelt
wrote:

Can you explain why exactly you are creating 60+ worksheets with 1 worksheet
per person?

"Dan" wrote:


I own a small company where my we get inquiries on a daily business
and we open the .csv files with rows like the following. An employee
places each in individual worksheets in one workbook (normally there
are approx. 12 rows of information):

A B
1 Information Input Column
2 Inquirer John Doe
3 Phone Number 123-123-1234
4 Email

We have 80-100 worksheets in one document at the end of the month.

My database is the first worksheet in the workbook, called
DBworksheet, followed by the 80-100 individual worksheets of
inquiries.

The header of the DBworksheet is:

INQUIRER STNUMBER STNAME CITY
STATE ZIP

The first inquiry worksheet, which is the second worksheet has a tab
titled Doe_John

To populate the first row under the header with the information of the
Doe_John worksheet, I have the formulas:

=Doe_John!$B$2 =Doe_John!$B$3 =Doe_John!$B$4

As of now, I am scrolling down and filling the number of rows with the
number of worksheets I have and manually doing a repair/replace in the
function.

For instance, the 2nd inquiry worksheet is Smith_Joyce. After using
fill I highlight the copied Doe_John row and find/replace by:

Find: Doe_John
Replace: Smith_Joyce

Each function with Doe_John is replaced with Smith_Joyce:

=Smith_Joyce!$B$2 =Smith_Joyce!$B$3 =Smith_Joyce!$B$4

My row after John Doe is populated now with Joyce Smith.

Is there a way I can create a macro that counts how many inqury
worksheets I have, fills the rows and then does a find/replace based
on each tab name so I don't have to do it manually?

Thanks,

Dan


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Is a macro possible here?

Thanks, I'll give it a try!

On Wed, 2 Apr 2008 04:25:01 -0700, Joel
wrote:

I created formulas like you did in the example. You can also hard copy the
value into the DBworksheet. I did only three rows of data, you can add up to
the 10 rows as needed.


Sub create_db()

RowCount = 1
For Each sht In ThisWorkbook.Sheets
If sht.Name < "DBworksheet" Then
With Sheets("DBworksheet")
.Range("A" & RowCount).Formula = _
"=" & sht.Name & "!$B$2"
.Range("B" & RowCount).Formula = _
"=" & sht.Name & "!$B$3"
.Range("C" & RowCount).Formula = _
"=" & sht.Name & "!$B$4"
End With
RowCount = RowCount + 1
End If
next sht
End Sub


"Dan" wrote:


I own a small company where my we get inquiries on a daily business
and we open the .csv files with rows like the following. An employee
places each in individual worksheets in one workbook (normally there
are approx. 12 rows of information):

A B
1 Information Input Column
2 Inquirer John Doe
3 Phone Number 123-123-1234
4 Email

We have 80-100 worksheets in one document at the end of the month.

My database is the first worksheet in the workbook, called
DBworksheet, followed by the 80-100 individual worksheets of
inquiries.

The header of the DBworksheet is:

INQUIRER STNUMBER STNAME CITY
STATE ZIP

The first inquiry worksheet, which is the second worksheet has a tab
titled Doe_John

To populate the first row under the header with the information of the
Doe_John worksheet, I have the formulas:

=Doe_John!$B$2 =Doe_John!$B$3 =Doe_John!$B$4

As of now, I am scrolling down and filling the number of rows with the
number of worksheets I have and manually doing a repair/replace in the
function.

For instance, the 2nd inquiry worksheet is Smith_Joyce. After using
fill I highlight the copied Doe_John row and find/replace by:

Find: Doe_John
Replace: Smith_Joyce

Each function with Doe_John is replaced with Smith_Joyce:

=Smith_Joyce!$B$2 =Smith_Joyce!$B$3 =Smith_Joyce!$B$4

My row after John Doe is populated now with Joyce Smith.

Is there a way I can create a macro that counts how many inqury
worksheets I have, fills the rows and then does a find/replace based
on each tab name so I don't have to do it manually?

Thanks,

Dan


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 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) 1 February 5th 07 09:31 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
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


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