Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Return a Specific Value

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Return a Specific Value

Assuming the col headers in B1:E1 are amended
to be just numbers, eg: "1" instead of "Wk1" (drop the "Wk"),
you could then place this expression in F2:
=SUBSTITUTE(TRIM(IF(B225,B$1," ")&IF(C225,C$1," ")&IF(D225,D$1,"
")&IF(E225,E$1," "))," ",",")
and copy F2 down to return exactly the results that you seek

Success? Celebrate it, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"Tami" wrote:
I need a formula 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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Return a Specific Value

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


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Return a Specific Value

=SUBSTITUTE(TRIM(IF(B225,"1 ","")&IF(C225,"2 ","")&IF(D225,"3
","")&IF(E225,4,""))," ",",")


"Tami" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Return a Specific Value

thanks...that worked:-)

"Teethless mama" wrote:

=SUBSTITUTE(TRIM(IF(B225,"1 ","")&IF(C225,"2 ","")&IF(D225,"3
","")&IF(E225,4,""))," ",",")


"Tami" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Return a Specific Value

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



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Return a Specific Value

You're Welcome!

"Tami" wrote:

thanks...that worked:-)

"Teethless mama" wrote:

=SUBSTITUTE(TRIM(IF(B225,"1 ","")&IF(C225,"2 ","")&IF(D225,"3
","")&IF(E225,4,""))," ",",")


"Tami" wrote:

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

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Return a Specific Value

hi...can you look at my question under "sum until hit blank"...i'm getting
#n/a and don't know how to fix...thx


"Don Guillett" wrote:

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





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
Return the filtered value into a specific cell Sal Excel Worksheet Functions 5 April 5th 23 01:23 PM
A mysterious if function to return a specific balance? hankach[_3_] Excel Worksheet Functions 2 September 17th 08 09:07 PM
Return Values in a specific column Eric H Excel Discussion (Misc queries) 3 August 13th 08 10:50 AM
Return Maximum value for Specific Month(s) Sam via OfficeKB.com Excel Worksheet Functions 5 December 6th 06 07:42 PM
What function do I use to return a certain value for specific text marjoryann Excel Discussion (Misc queries) 4 June 30th 06 12:00 AM


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