Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default challenge for the braniacs!!! i need help.

I want to make a macro that will create a dropdown list of steel members that
are acceptable. the easiest way to explain is with an example...
2 sheets: Verticals, Steel
Verticals:
A B C D E F
1 Deflection Steel
2 Allow Actual Needed Description Ix Weight
3 .5 .4 (dropdown1)
4 .32 .25 (dropdown2) 2X3 BAR 3 5
5 .5 1.3 (dropdown3) 4X3 BAR 6 8

Steel:
A B C D
1 Item Description Ix Weight
2 1 1X2 BAR 1 2
3 2 2X3 BAR 3 5
4 3 4X3 BAR 6 8

(Dropdown1)=
-"NONE NEEDED"
(Dropdown2) =
- "2 - 1X2 BAR"
- "3 - 4X3 BAR"
and displays "2" when selected
(Dropdown3) =
- "3 - 4X3 BAR"
and displays "3" when selected

ok. So the point of all this is to have a macro that will go through my
steel sheet after doing my calcs to see if the defl works with the properties
Ix & Weight.. and display a dropdown list in the "Steel Needed" column.
i was thinking something like this: (but i dont know VBA)

C3,C4,C5=

if Defl Actual Defl Allowable then
for (x=1, to 'Last item on Steel sheet', x++)
'check defl with formula, using item 'x' properties
if 'defl with Steel' < Defl Allowable then
' add to dropdown list
end if
end loop
else Steel Needed = "No Steel Needed"
end if

next:
if item '3 (for example)' is selected then
display '3' in cell (not '3 - 4x3 BAR')
end if

can anyone help? ive posted this before, and nobody's responded..
thanks so much.
Ps. If this is posted twice, its because there was an error posting and i
dont know if it actually posted.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default challenge for the braniacs!!! i need help.

Hi Derrick- a few questions, which might help clarify and get responses from
the community;

(1) in your dropdown examples, you have several marked as "and displays 'x'
when selected". Are you indicating that you just need the first item to be
the default item showing in that cell (a pre-selection, if you will), or are
you saying that when a selection is made, that you want to replace the text
string with an actual numeric value (and if so, why)?

(2) It isn't clear to me (because I'm not familiar with steel engineering)
how this will calculate (or if that is your intention) a new deflection based
on the steel item selected, or how to identify which steel options to use to
populate the drop-down box based on deflection in a particular project (which
I'm guessing is based on the length of the steel, how much weight it needs to
bear, etc). Your code mentions "if 'defl with Steel' < Defl Allowable" so I'm
assuming that 'defl with Steel' is the same thing as "Deflection Actual"
(Column B) but how will your code know that Steel options 3 and 4 produce an
acceptable deflection, but Steel options 1 and 2 don't?

Based on a very limited understanding of what you are trying to achieve, it
sounds like you will need a potentially different list for each drop-down. To
do that, I'd suggest using your code to generate an array of the options for
a particular cell, name it (like a named range), and then assign that to the
cell's data validation (all in code).

Best,
Keith

"Derrick" wrote:

I want to make a macro that will create a dropdown list of steel members that
are acceptable. the easiest way to explain is with an example...
2 sheets: Verticals, Steel
Verticals:
A B C D E F
1 Deflection Steel
2 Allow Actual Needed Description Ix Weight
3 .5 .4 (dropdown1)
4 .32 .25 (dropdown2) 2X3 BAR 3 5
5 .5 1.3 (dropdown3) 4X3 BAR 6 8

Steel:
A B C D
1 Item Description Ix Weight
2 1 1X2 BAR 1 2
3 2 2X3 BAR 3 5
4 3 4X3 BAR 6 8

(Dropdown1)=
-"NONE NEEDED"
(Dropdown2) =
- "2 - 1X2 BAR"
- "3 - 4X3 BAR"
and displays "2" when selected
(Dropdown3) =
- "3 - 4X3 BAR"
and displays "3" when selected

ok. So the point of all this is to have a macro that will go through my
steel sheet after doing my calcs to see if the defl works with the properties
Ix & Weight.. and display a dropdown list in the "Steel Needed" column.
i was thinking something like this: (but i dont know VBA)

C3,C4,C5=

if Defl Actual Defl Allowable then
for (x=1, to 'Last item on Steel sheet', x++)
'check defl with formula, using item 'x' properties
if 'defl with Steel' < Defl Allowable then
' add to dropdown list
end if
end loop
else Steel Needed = "No Steel Needed"
end if

next:
if item '3 (for example)' is selected then
display '3' in cell (not '3 - 4x3 BAR')
end if

can anyone help? ive posted this before, and nobody's responded..
thanks so much.
Ps. If this is posted twice, its because there was an error posting and i
dont know if it actually posted.

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
Who's up for a Challenge? Growe1 Excel Worksheet Functions 4 March 16th 09 05:33 AM
Anyone up for what I see could be a challenge? Jeff-B[_2_] Excel Programming 3 September 27th 08 07:47 PM
Got a little challenge any ? nrage21[_33_] Excel Programming 2 February 13th 04 09:44 PM
This May Be A Challenge Paul D[_2_] Excel Programming 1 September 12th 03 12:12 AM
This May Be A Challenge Jose Rojas Excel Programming 0 September 11th 03 11:52 PM


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