Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Range selection for macro

I would like to select a range of cells using my mouse and then start a
macro based on the selected range.

How do I code the macro to use the mouse selected range for the SUMIF
functions that followin the macro?

The range would be not be the same every time. The SUMIF function would be
the same for any selected range.

Thanks in advance for your help


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Range selection for macro

My spreadsheet has three columns with location, asset and value as the
headings

Location Asset Value
MRS Canadian Bond Fund A $25,000.00
MRS Canadian High Yield Income Fund A $222,757.79
MRS Canadian High Yield Income Fund B $215,462.95
MRS Canadian Small Cap Fund C $68,061.63
MRS Capital Yield Class A $71,569.49
MRS Income Trust Fund A $160,000.00
MRS Dividend Fund C $566,997.47
MRS European Equity Fund C $146,231.60
MRS US Equity Class A $187,678.56
MRS Etical Class A $50,000.00
MRS Japanese Equity Class A $160,413.63
MRS Japanese Equity Fund C $66,015.13
MRS Property Fund A $35,000.00
MRS Pacific International Fund C $109,642.22
MRS Property Fund C $283,445.52
MRS China Fund B $56,897.09
MRS US Large Cap Value Fund C $229,806.86
MRS US Small Cap Class A $163,777.34
Bank European Equity Fund C $68,037.07
Bank US Equity Class A $93,880.82
Bank Pacific International Fund C $13,508.69
Bank Property Fund C $42,863.05
Bank Etical Class A $48,488.21
GFS Canadian High Yield Income Fund C $52,000.37
GFS Income Trust Fund A $5,452.55
GFS Mortgage Fund C $62,191.50
GFS Property Fund C $45,911.96
GFS Mortgage Fund A $118.84
GFS Mortgage C $127,287.44
GFS Property Fund C $22,920.77


I want to be able to select all the MRS values and use that range to tell me
how much of each asset type (Fund A, Fund B, Fund C, etc) I have for a
particular location using the SUMIF function. The assets types are fixed -
I have 5 types. From this I would generate a pie chart showing the
breakdown of each type. I have been able to do this for the complete range,
but now I want to so the same thing using a macro for a mouse selected
range.

Next I would do the same for the values at each other location.

Each time I select the range with my mouse I would run the same macro which
would overwrite the previous data.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Range selection for macro


Instead of doing it all over, post your code for doing it all for
comments/modifications.

--
Don Guillett
SalesAid Software

"Emile" wrote in message
...
My spreadsheet has three columns with location, asset and value as the
headings

Location Asset Value
MRS Canadian Bond Fund A $25,000.00
MRS Canadian High Yield Income Fund A $222,757.79
MRS Canadian High Yield Income Fund B $215,462.95
MRS Canadian Small Cap Fund C $68,061.63
MRS Capital Yield Class A $71,569.49
MRS Income Trust Fund A $160,000.00
MRS Dividend Fund C $566,997.47
MRS European Equity Fund C $146,231.60
MRS US Equity Class A $187,678.56
MRS Etical Class A $50,000.00
MRS Japanese Equity Class A $160,413.63
MRS Japanese Equity Fund C $66,015.13
MRS Property Fund A $35,000.00
MRS Pacific International Fund C $109,642.22
MRS Property Fund C $283,445.52
MRS China Fund B $56,897.09
MRS US Large Cap Value Fund C $229,806.86
MRS US Small Cap Class A $163,777.34
Bank European Equity Fund C $68,037.07
Bank US Equity Class A $93,880.82
Bank Pacific International Fund C $13,508.69
Bank Property Fund C $42,863.05
Bank Etical Class A $48,488.21
GFS Canadian High Yield Income Fund C $52,000.37
GFS Income Trust Fund A $5,452.55
GFS Mortgage Fund C $62,191.50
GFS Property Fund C $45,911.96
GFS Mortgage Fund A $118.84
GFS Mortgage C $127,287.44
GFS Property Fund C $22,920.77


I want to be able to select all the MRS values and use that range to tell
me how much of each asset type (Fund A, Fund B, Fund C, etc) I have for a
particular location using the SUMIF function. The assets types are
fixed - I have 5 types. From this I would generate a pie chart showing
the breakdown of each type. I have been able to do this for the complete
range, but now I want to so the same thing using a macro for a mouse
selected range.

Next I would do the same for the values at each other location.

Each time I select the range with my mouse I would run the same macro
which would overwrite the previous data.


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
Sumeif macro with range selection orquidea Excel Discussion (Misc queries) 14 August 29th 08 03:12 AM
Macro Range Selection Roy A.[_2_] Excel Discussion (Misc queries) 3 March 16th 08 04:38 PM
How to get users' range selection in VBA macro? Samuel Wu Excel Programming 2 December 1st 06 06:10 PM
Macro to change list box input range based on selection made in another cell Sue[_6_] Excel Programming 3 October 7th 04 06:45 PM
Range selection code in a macro Floss Excel Programming 1 December 30th 03 01:05 AM


All times are GMT +1. The time now is 09:23 AM.

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"