Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc,microsoft.public.excel
external usenet poster
 
Posts: 36
Default is there a way to program my Excel file to do a loop?

Hi all,

If I want B10 to B17 all follow the change of the same number(copy cell),
let's say I put it in A1,

and C10 follows the change of A2(copy cell), and C11 follows the change of
A3(copy cell), and C12 follows the change of A4(copy cell),

then I have 4 variables in my calculations: A1, A2, A3, A4.

I want to loop each of the variables in a different set,

then I hope the whole worksheet will be able to refresh following the change
of A1, A2, A3, A4,

and then I want to find the very set of A1, A2, A3, A4 that gives the
smallest value of D10,

how do I program the whole procedure in Excel?

Please give me detailed program, I am really a newbie in Excel, I tend to
learn better with hands-on problem and sample detailed answers.

Thanks a lot and happy near year!



  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 142
Default is there a way to program my Excel file to do a loop?



Put this in B10 through B17
=IF($A$1<"",$A$1,"")
( it will read the number in A1)

Put this in C10
=IF(A2<"",A2,"")
( it will read the number in A2)

Put this in wherever you need
=SMALL(D10:D15,1)
(It will give you the smallest number between D10 and D15)
Im not sure if you need to parse D10 for the smallest number, if you have
more than one number in D10......, but I thought that might just be a typo
there.
HTH


Put this in C11
=IF(A3<"",A3,"")
( it will rrad the number in A3)

Put this in C12
=IF(A4<"",A4,"")
( it will rrad the number in A4)






"cfman" wrote:

Hi all,

If I want B10 to B17 all follow the change of the same number(copy cell),
let's say I put it in A1,

and C10 follows the change of A2(copy cell), and C11 follows the change of
A3(copy cell), and C12 follows the change of A4(copy cell),

then I have 4 variables in my calculations: A1, A2, A3, A4.

I want to loop each of the variables in a different set,

then I hope the whole worksheet will be able to refresh following the change
of A1, A2, A3, A4,

and then I want to find the very set of A1, A2, A3, A4 that gives the
smallest value of D10,

how do I program the whole procedure in Excel?

Please give me detailed program, I am really a newbie in Excel, I tend to
learn better with hands-on problem and sample detailed answers.

Thanks a lot and happy near year!




  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 1,696
Default is there a way to program my Excel file to do a loop?

OK, I'm trying to understand the question completely, so let me put it the
way I understand it:
A1,A2,A3 and A4 will have variables
B10 to B17 will be calculations off of A1, C10 is a calc of A2, C11 is a
calc of A3 and C12 is a calc of A4
You want these calculated values to sum up in cell D10, and whichever one
sums up the smallest number, you want that variable from the A column to be
highlighted.

Assuming all of this, I would try this:
Put your formulas in the b and c cells
I would have the results of the calculations in three places, not just D10.

So, reuslts from the B cells goes in, say, B18
Then, the other ones are only one value anyway, so no need to put a results
cell anywhere.

Now, go to cells A1
go to Format -Conditional Formatting
Select formula is from the drop-down box
Type =A1=MAX(B18,C10,C11,C12)
Go to cells A2, A3 and A4 and repeat the above, but change the formula to
=A2 etc., =A3 etc.

Hope you get the idea there...

Let me know if that's what you're looking for!

"cfman" wrote:

Hi all,

If I want B10 to B17 all follow the change of the same number(copy cell),
let's say I put it in A1,

and C10 follows the change of A2(copy cell), and C11 follows the change of
A3(copy cell), and C12 follows the change of A4(copy cell),

then I have 4 variables in my calculations: A1, A2, A3, A4.

I want to loop each of the variables in a different set,

then I hope the whole worksheet will be able to refresh following the change
of A1, A2, A3, A4,

and then I want to find the very set of A1, A2, A3, A4 that gives the
smallest value of D10,

how do I program the whole procedure in Excel?

Please give me detailed program, I am really a newbie in Excel, I tend to
learn better with hands-on problem and sample detailed answers.

Thanks a lot and happy near year!




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
Need to Query Excel File Opened by Another User Paul Excel Discussion (Misc queries) 0 December 13th 06 05:57 PM
Excel file with hyperlinks takes a long time to open over the network Didier P Links and Linking in Excel 3 July 4th 06 04:39 PM
Excel Outlook Attachments opening after several errors everytime cito_support Setting up and Configuration of Excel 2 March 13th 06 06:15 PM
Excel crashes while opening excel file imbeddied with macros ct2147 Excel Discussion (Misc queries) 0 December 30th 05 09:05 PM
Weird File Open/Save As Behavior [email protected] Excel Discussion (Misc queries) 0 December 9th 05 02:26 AM


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