#1   Report Post  
Old February 7th 06, 10:25 PM posted to microsoft.public.excel.misc
tt
 
Posts: n/a
Default RefEdit question

I am running Excel 20003.

I created a user form that allows someone to select 3 ranges on a worksheet
(3 RefEdit controls added to a form w/ an OK button). The 3 ranges will
consist of real numbers.

When the user hits the Ok button, the macro should then assign a value to
the 3rd range selected by the user that is equal to the sum of the numbers
in the first range divided by the sum of the numbers in the 2nd range.

Creating the user form and allowing the user to select 3 different ranges
was no problem, but my macro that does the math listed above is not working
right...

I am using the formula below... Excel doesn't like my sum formula for some
reason. Can somebody please help a newbie?


Range(RefEdit3).Value = Sum(Range(RefEdit1)) / (Sum(Range(RefEdit1)) +
Sum(Range(RefEdit2)))


Thanks in advance,

TT



  #2   Report Post  
Old February 8th 06, 02:27 AM posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default RefEdit question

Maybe using application.sum() would work.

And if that didn't help, I'd check to make sure each of those ranges actually
contained single cells and the values in those cells are numeric.



tt wrote:

I am running Excel 20003.

I created a user form that allows someone to select 3 ranges on a worksheet
(3 RefEdit controls added to a form w/ an OK button). The 3 ranges will
consist of real numbers.

When the user hits the Ok button, the macro should then assign a value to
the 3rd range selected by the user that is equal to the sum of the numbers
in the first range divided by the sum of the numbers in the 2nd range.

Creating the user form and allowing the user to select 3 different ranges
was no problem, but my macro that does the math listed above is not working
right...

I am using the formula below... Excel doesn't like my sum formula for some
reason. Can somebody please help a newbie?

Range(RefEdit3).Value = Sum(Range(RefEdit1)) / (Sum(Range(RefEdit1)) +
Sum(Range(RefEdit2)))

Thanks in advance,

TT


--

Dave Peterson
  #3   Report Post  
Old February 8th 06, 03:42 AM posted to microsoft.public.excel.misc
exceluserforeman
 
Posts: n/a
Default RefEdit question


Write a message box for one of the refedit values and see what comes up.

I tried using refedit but it gave me too masny problems.



"tt" wrote:

I am running Excel 20003.

I created a user form that allows someone to select 3 ranges on a worksheet
(3 RefEdit controls added to a form w/ an OK button). The 3 ranges will
consist of real numbers.

When the user hits the Ok button, the macro should then assign a value to
the 3rd range selected by the user that is equal to the sum of the numbers
in the first range divided by the sum of the numbers in the 2nd range.

Creating the user form and allowing the user to select 3 different ranges
was no problem, but my macro that does the math listed above is not working
right...

I am using the formula below... Excel doesn't like my sum formula for some
reason. Can somebody please help a newbie?


Range(RefEdit3).Value = Sum(Range(RefEdit1)) / (Sum(Range(RefEdit1)) +
Sum(Range(RefEdit2)))


Thanks in advance,

TT





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
Pivot table question gary Excel Discussion (Misc queries) 1 January 10th 06 06:25 PM
Follow-Up (Clarification) to MIN question Odawg Excel Discussion (Misc queries) 4 October 20th 05 04:04 AM
Benefits many people - Question ebgehringer Excel Discussion (Misc queries) 0 October 7th 05 09:22 PM
How do I find and replace a question mark in Excel? Ranpalandil Excel Discussion (Misc queries) 1 September 7th 05 10:20 PM
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM


All times are GMT +1. The time now is 05:19 AM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017