Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nicole Seibert
 
Posts: n/a
Default creating macro working across multiple sheets

How can I create a macro that works on a number of sheets all at once in
which the lists are mulitple lengths. In other words, one sheet has 134
entries while the second has 524 and so on. I need to create a column in
which a formula recognizes type of worker and then spits out the hours per
week. The formula is done.
How can I get Excel to recognize the differing column lengths and fill in
the formula accordingly? I have tried going to the bottom of the data and
shift-arrowup, but this doesn't work.
Please keep in mind that I don't speak VBA, but record my macros.
Thanks,
Nicole
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default creating macro working across multiple sheets

Nicole - You really can't *record* a macro that is flexible and dynamic. If
you need those virtues, you're going to have to write VBA code.

There are willing, able helpers here who can assist you, given enough
details about what you're trying to accomplish.


"Nicole Seibert" wrote:

How can I create a macro that works on a number of sheets all at once in
which the lists are mulitple lengths. In other words, one sheet has 134
entries while the second has 524 and so on. I need to create a column in
which a formula recognizes type of worker and then spits out the hours per
week. The formula is done.
How can I get Excel to recognize the differing column lengths and fill in
the formula accordingly? I have tried going to the bottom of the data and
shift-arrowup, but this doesn't work.
Please keep in mind that I don't speak VBA, but record my macros.
Thanks,
Nicole

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jim Thomlinson
 
Posts: n/a
Default creating macro working across multiple sheets

What you want to do requires VBA. You can not just record what you want. It
will look something like this...

sub DoSomeStuff()
dim wks as worksheet

for each wks in worksheets
wks.cells(rows.count, "A").end(xlup).offset(1, 0).formula = "=1+2"
next wks
exit sub

This puts the formula =1+2 into the first empty cell in column A of every
sheet. What I need to know is what formula do you need and are there any
sheets that should be excluded.
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

How can I create a macro that works on a number of sheets all at once in
which the lists are mulitple lengths. In other words, one sheet has 134
entries while the second has 524 and so on. I need to create a column in
which a formula recognizes type of worker and then spits out the hours per
week. The formula is done.
How can I get Excel to recognize the differing column lengths and fill in
the formula accordingly? I have tried going to the bottom of the data and
shift-arrowup, but this doesn't work.
Please keep in mind that I don't speak VBA, but record my macros.
Thanks,
Nicole

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nicole Seibert
 
Posts: n/a
Default creating macro working across multiple sheets

Oh, and can I tell Excel to create a column and put the information there
....after the last column with information in it.
Thanks again.

"Jim Thomlinson" wrote:

What you want to do requires VBA. You can not just record what you want. It
will look something like this...

sub DoSomeStuff()
dim wks as worksheet

for each wks in worksheets
wks.cells(rows.count, "A").end(xlup).offset(1, 0).formula = "=1+2"
next wks
exit sub

This puts the formula =1+2 into the first empty cell in column A of every
sheet. What I need to know is what formula do you need and are there any
sheets that should be excluded.
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

How can I create a macro that works on a number of sheets all at once in
which the lists are mulitple lengths. In other words, one sheet has 134
entries while the second has 524 and so on. I need to create a column in
which a formula recognizes type of worker and then spits out the hours per
week. The formula is done.
How can I get Excel to recognize the differing column lengths and fill in
the formula accordingly? I have tried going to the bottom of the data and
shift-arrowup, but this doesn't work.
Please keep in mind that I don't speak VBA, but record my macros.
Thanks,
Nicole

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default creating macro working across multiple sheets

Nicole -

Your formula is needlessly complicated. It could be much simpler if you
created a table in each worksheet & structured it as a lookup table like this:

Column A Column B
98 NTNI 7.50
GENERIC 0.00
17 PARTIME NONEXEMPT 4.00
18 PARTIME NONEXEMPT 4.00
27 PARTIME NONEXEMPT 4.00
28 PARTIME NONEXEMPT 4.00

Give the range a name, such as Rates

Your formula would then be:

=IF(ISNA(VLOOKUP(F4, Rates,2,0)),8,VLOOKUP(F4, Rates,2,0))

If you can't put this table in each workbook, use this formula instead:

=IF(OR(F4="17 PARTIME NONEXEMPT",F4="18 PARTIME NONEXEMPT",F4="27 PARTIME
NONEXEMPT",F4="28 PARTIME NONEXEMPT"),4,IF(F4="98
NTNI",7.5,IF(F4="GENERIC",0,8)))

Now, for the macro - where do you want this formula to go in each sheet? Is
it always the same column and just the number of rows vary from sheet to
sheet? Try to carefully state the steps you would follow if you were going
to do this manually.


"Nicole Seibert" wrote:

Oh, and can I tell Excel to create a column and put the information there
...after the last column with information in it.
Thanks again.

"Jim Thomlinson" wrote:

What you want to do requires VBA. You can not just record what you want. It
will look something like this...

sub DoSomeStuff()
dim wks as worksheet

for each wks in worksheets
wks.cells(rows.count, "A").end(xlup).offset(1, 0).formula = "=1+2"
next wks
exit sub

This puts the formula =1+2 into the first empty cell in column A of every
sheet. What I need to know is what formula do you need and are there any
sheets that should be excluded.
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

How can I create a macro that works on a number of sheets all at once in
which the lists are mulitple lengths. In other words, one sheet has 134
entries while the second has 524 and so on. I need to create a column in
which a formula recognizes type of worker and then spits out the hours per
week. The formula is done.
How can I get Excel to recognize the differing column lengths and fill in
the formula accordingly? I have tried going to the bottom of the data and
shift-arrowup, but this doesn't work.
Please keep in mind that I don't speak VBA, but record my macros.
Thanks,
Nicole



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jim Thomlinson
 
Posts: n/a
Default creating macro working across multiple sheets

Sorry. Work got nuts and I could not get back to your question. Do you still
need help with this?
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

Oh, and can I tell Excel to create a column and put the information there
...after the last column with information in it.
Thanks again.

"Jim Thomlinson" wrote:

What you want to do requires VBA. You can not just record what you want. It
will look something like this...

sub DoSomeStuff()
dim wks as worksheet

for each wks in worksheets
wks.cells(rows.count, "A").end(xlup).offset(1, 0).formula = "=1+2"
next wks
exit sub

This puts the formula =1+2 into the first empty cell in column A of every
sheet. What I need to know is what formula do you need and are there any
sheets that should be excluded.
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

How can I create a macro that works on a number of sheets all at once in
which the lists are mulitple lengths. In other words, one sheet has 134
entries while the second has 524 and so on. I need to create a column in
which a formula recognizes type of worker and then spits out the hours per
week. The formula is done.
How can I get Excel to recognize the differing column lengths and fill in
the formula accordingly? I have tried going to the bottom of the data and
shift-arrowup, but this doesn't work.
Please keep in mind that I don't speak VBA, but record my macros.
Thanks,
Nicole

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nicole Seibert
 
Posts: n/a
Default creating macro working across multiple sheets

Thanks to both of you. I think I am going to try and do this before I ask for
any more help.

"Jim Thomlinson" wrote:

Sorry. Work got nuts and I could not get back to your question. Do you still
need help with this?
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

Oh, and can I tell Excel to create a column and put the information there
...after the last column with information in it.
Thanks again.

"Jim Thomlinson" wrote:

What you want to do requires VBA. You can not just record what you want. It
will look something like this...

sub DoSomeStuff()
dim wks as worksheet

for each wks in worksheets
wks.cells(rows.count, "A").end(xlup).offset(1, 0).formula = "=1+2"
next wks
exit sub

This puts the formula =1+2 into the first empty cell in column A of every
sheet. What I need to know is what formula do you need and are there any
sheets that should be excluded.
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

How can I create a macro that works on a number of sheets all at once in
which the lists are mulitple lengths. In other words, one sheet has 134
entries while the second has 524 and so on. I need to create a column in
which a formula recognizes type of worker and then spits out the hours per
week. The formula is done.
How can I get Excel to recognize the differing column lengths and fill in
the formula accordingly? I have tried going to the bottom of the data and
shift-arrowup, but this doesn't work.
Please keep in mind that I don't speak VBA, but record my macros.
Thanks,
Nicole

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jim Thomlinson
 
Posts: n/a
Default creating macro working across multiple sheets

That is the best way to learn. If you want some help take a look at the
Excel.Programming section (You are in Excel.Worksheet.Functions at the
moment). There are lots of good examples and piles of very accomplished Excel
programmers.
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

Thanks to both of you. I think I am going to try and do this before I ask for
any more help.

"Jim Thomlinson" wrote:

Sorry. Work got nuts and I could not get back to your question. Do you still
need help with this?
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

Oh, and can I tell Excel to create a column and put the information there
...after the last column with information in it.
Thanks again.

"Jim Thomlinson" wrote:

What you want to do requires VBA. You can not just record what you want. It
will look something like this...

sub DoSomeStuff()
dim wks as worksheet

for each wks in worksheets
wks.cells(rows.count, "A").end(xlup).offset(1, 0).formula = "=1+2"
next wks
exit sub

This puts the formula =1+2 into the first empty cell in column A of every
sheet. What I need to know is what formula do you need and are there any
sheets that should be excluded.
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

How can I create a macro that works on a number of sheets all at once in
which the lists are mulitple lengths. In other words, one sheet has 134
entries while the second has 524 and so on. I need to create a column in
which a formula recognizes type of worker and then spits out the hours per
week. The formula is done.
How can I get Excel to recognize the differing column lengths and fill in
the formula accordingly? I have tried going to the bottom of the data and
shift-arrowup, but this doesn't work.
Please keep in mind that I don't speak VBA, but record my macros.
Thanks,
Nicole

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nicole Seibert
 
Posts: n/a
Default creating macro working across multiple sheets

Thank you.

The fomula is as follows:
=IF(F4="98 NTNI",7.5,IF(F4="GENERIC",0,IF(F4="17 PARTIME
NONEXEMPT",4,IF(F4="18 REGULAR PART TIME NONEXEMPT",4,IF(F4="27 PART TIME
EXEMPT",4,IF(F4="28 REGULAR PART TIME EXEMPT",4,8))))))

The worksheets have been renamed ___________ Supply and there are four of
them book that is 7 to 8 worksheets. Can I get Excel to recognize the name
of a worksheet like it would when I name a column?

"Jim Thomlinson" wrote:

What you want to do requires VBA. You can not just record what you want. It
will look something like this...

sub DoSomeStuff()
dim wks as worksheet

for each wks in worksheets
wks.cells(rows.count, "A").end(xlup).offset(1, 0).formula = "=1+2"
next wks
exit sub

This puts the formula =1+2 into the first empty cell in column A of every
sheet. What I need to know is what formula do you need and are there any
sheets that should be excluded.
--
HTH...

Jim Thomlinson


"Nicole Seibert" wrote:

How can I create a macro that works on a number of sheets all at once in
which the lists are mulitple lengths. In other words, one sheet has 134
entries while the second has 524 and so on. I need to create a column in
which a formula recognizes type of worker and then spits out the hours per
week. The formula is done.
How can I get Excel to recognize the differing column lengths and fill in
the formula accordingly? I have tried going to the bottom of the data and
shift-arrowup, but this doesn't work.
Please keep in mind that I don't speak VBA, but record my macros.
Thanks,
Nicole

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
sumproduct looking at multiple sheets BSantos Excel Worksheet Functions 4 February 27th 06 07:40 PM
selecting multiple sheets Shaun Excel Worksheet Functions 1 August 31st 05 04:09 PM
Printing Multiple sheets light_life_love Excel Discussion (Misc queries) 0 August 25th 05 08:52 PM
Macro that will add data from multiple workbooks to the 1st open r jbsand1001 Excel Discussion (Misc queries) 0 April 23rd 05 07:52 PM
linking multiple sheets to a summary sheet greg g Excel Discussion (Misc queries) 1 December 16th 04 07:43 AM


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