View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Return a Specific Value

And it could be incorporated into a worksheet_change event to be completely
automatic.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...

Each time you fire the macro it would re-do for all the styles in the
columns.
Instead of "with that you get fries", here "with that you get commas"

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Tami" wrote in message
...
Whoa...a little to advanced for me. But how would that work?...you would
run
the macro every time to get it to calc? i'm just not familiar with using
macros as "formulas"...

"Don Guillett" wrote:

How about a nice macro. Change your column number to suit the column
with
styles

Sub whichweeks()
Dim mc, i, j As Long
Dim ms As String

mc = 10 '"k"

For i = 2 To 4 'Cells(Rows.Count, mc).End(xlUp).Row
ms = ""
For j = 1 To 4
If Cells(i, j + mc) 25 Then ms = ms & j & ","
Next j
Cells(i, mc + 5) = (Left(ms, Len(ms) - 1))
Next i
'MsgBox ms
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Tami" wrote in message
...
I need a forumula to do the last column: tell me what weeks the units
are
arrivng (e.g. 1,2,4) but the catch is that the units need to be
greater
thatn
25 in any given week (i don't want the formula to state the week # if
its
an
immaterial week.

wk1 wk2 wk3 wk4 weeks
Style1 200 300 0 100 1,2,4
Style2 0 0 100 0 3
Style 3 0 200 0 150 2,4