Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Multiple options with multiple ranges

I have 20 pages in one worksheet working down. Based on the contents of a
cell in each page I need to be able to merge and insert text in a range on
each page.

So: Cell W8 contains one of many names. If cell W8 has the name Jim, I want
to merge the range M38:W42 and insert the text "Jim talks to much". If cell
W8 has the name Bill, I want to merge the range M39:W41 and insert the text
"Bill does something". If cell W8 contains any other name I will do nothing.

I can do this a few ways, no problem. But, if I want to be able to take each
page and have similar options:

Cell W65 contains Jim, I merge the range M95:W99 and insert the same text as
above. If cell W65 contains Bill, I merge the range M96:W98 and insert the
text for Bill. And so on down each page.

My first thought is to have a macro for each page with the different ranges.
There must be a better way, list boxes, combo boxes?????

Any suggestions would be very helpful.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Multiple options with multiple ranges

you could have one configuration table
column 1: sheet name
column 2: name
column 3: name's cell
column 4: range to merge
column 5: text message

your code would check the value of the names cell in each sheet - if it
matched the value in the secod column, the message is posted into the merged
cells



"Homer" wrote:

I have 20 pages in one worksheet working down. Based on the contents of a
cell in each page I need to be able to merge and insert text in a range on
each page.

So: Cell W8 contains one of many names. If cell W8 has the name Jim, I want
to merge the range M38:W42 and insert the text "Jim talks to much". If cell
W8 has the name Bill, I want to merge the range M39:W41 and insert the text
"Bill does something". If cell W8 contains any other name I will do nothing.

I can do this a few ways, no problem. But, if I want to be able to take each
page and have similar options:

Cell W65 contains Jim, I merge the range M95:W99 and insert the same text as
above. If cell W65 contains Bill, I merge the range M96:W98 and insert the
text for Bill. And so on down each page.

My first thought is to have a macro for each page with the different ranges.
There must be a better way, list boxes, combo boxes?????

Any suggestions would be very helpful.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Multiple options with multiple ranges

I made a summary table based on the contents of each page within the
worksheet. I have tried a number of ways to write the code, nothing has
worked. Mainly due to my very limited knowledge of how programing works.

Each of the 20 pages is on one worksheet, so column 1 will be page number.

Here is what I have:

Page number Name Name's Cell Range to Merge Message
1 Jim W8 M38:W42 Jim
talks too much
2 Bill W65 M95:W99
Bill does something
3 Bill W122 M152:W156 Bill
does somethign
4 Joe W184 M209:W213
5 Jim W241 M266:W270 Jim
talks too much
6 Don W298 M323:W327

And so on for 20 pages

The blanks in the message should mean the cells do not merge and there is no
text.

Can this be done?





"Patrick Molloy" wrote:

you could have one configuration table
column 1: sheet name
column 2: name
column 3: name's cell
column 4: range to merge
column 5: text message

your code would check the value of the names cell in each sheet - if it
matched the value in the secod column, the message is posted into the merged
cells



"Homer" wrote:

I have 20 pages in one worksheet working down. Based on the contents of a
cell in each page I need to be able to merge and insert text in a range on
each page.

So: Cell W8 contains one of many names. If cell W8 has the name Jim, I want
to merge the range M38:W42 and insert the text "Jim talks to much". If cell
W8 has the name Bill, I want to merge the range M39:W41 and insert the text
"Bill does something". If cell W8 contains any other name I will do nothing.

I can do this a few ways, no problem. But, if I want to be able to take each
page and have similar options:

Cell W65 contains Jim, I merge the range M95:W99 and insert the same text as
above. If cell W65 contains Bill, I merge the range M96:W98 and insert the
text for Bill. And so on down each page.

My first thought is to have a macro for each page with the different ranges.
There must be a better way, list boxes, combo boxes?????

Any suggestions would be very helpful.


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
Can I create Multiple passwords to edit multiple ranges? Conker10382 Excel Discussion (Misc queries) 8 December 31st 06 07:58 PM
How do i update multiple data ranges across multiple worksheets? mwah Excel Discussion (Misc queries) 0 July 6th 06 04:57 AM
Crteating Multiple GIFS from Multiple Ranges -- need someone to test my code to see why it fails Father Guido[_5_] Excel Programming 4 November 22nd 05 05:28 AM
Crteating Multiple GIFS from Multiple Ranges -- need someone to test my code to see why it fails Father Guido[_5_] Excel Programming 0 November 19th 05 08:00 AM
Printing Multiple Ranges from Multiple Worksheets Dave Barkley[_2_] Excel Programming 1 July 22nd 03 06:10 PM


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