#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Index Match

I think Index Match is what I want but not getting results I want: (and
that's why I'm here asking, you all are the best :-)



Sheet 1 - table 1 - criteria E5:G176

Col E Col G
MWFS TSBGE
MWFS TSBGK
MWF PURNC
MF NPUOT
WS SMPHP
M SCCS
M WESTVS
W MUGMC
F STAHM


Sheet 2 - return results E5:E176

I need to match all cells that contain M(onday) in column E on sheet1
and return the customer code that is in column G sheet1

Sheet 3 will be for W(ednesday)
Sheet 4 will be for F(riday)
Sheet 5 will be for S(aturday)


Hope this clear and provides enough info.
Thank you!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Index Match

Hi,

Am Thu, 1 Feb 2018 09:03:44 -0600 schrieb leonard hofstatder:

I think Index Match is what I want but not getting results I want: (and
that's why I'm here asking, you all are the best :-)

Sheet 1 - table 1 - criteria E5:G176

Col E Col G
MWFS TSBGE
MWFS TSBGK
MWF PURNC
MF NPUOT
WS SMPHP
M SCCS
M WESTVS
W MUGMC
F STAHM

Sheet 2 - return results E5:E176

I need to match all cells that contain M(onday) in column E on sheet1
and return the customer code that is in column G sheet1

Sheet 3 will be for W(ednesday)
Sheet 4 will be for F(riday)
Sheet 5 will be for S(aturday)


try it with VBA:

Sub Test()
Dim myRng As Range, c As Range
Dim varCheck As Variant
Dim FirstAddress As String
Dim i As Integer, n As Integer

varCheck = Array("M", "W", "F", "S")
Set myRng = Sheets("Sheet1").Range("E5:E176")

For i = LBound(varCheck) To UBound(varCheck)
n = 5
Set c = myRng.Find(varCheck(i), LookIn:=xlValues, lookat:=xlPart)
If Not c Is Nothing Then
FirstAddress = c.Address
Do
Sheets("Sheet" & i + 2).Cells(n, "E") = _
c.Offset(, 2)
n = n + 1
Set c = myRng.FindNext(c)
Loop While c.Address < FirstAddress
End If
Next
End Sub


Regards
Claus B.
--
Windows10
Office 2016
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Index Match

On 2/1/2018 4:13 PM, Claus Busch wrote:
Hi,

Am Thu, 1 Feb 2018 09:03:44 -0600 schrieb leonard hofstatder:

I think Index Match is what I want but not getting results I want: (and
that's why I'm here asking, you all are the best :-)

Sheet 1 - table 1 - criteria E5:G176

Col E Col G
MWFS TSBGE
MWFS TSBGK
MWF PURNC
MF NPUOT
WS SMPHP
M SCCS
M WESTVS
W MUGMC
F STAHM

Sheet 2 - return results E5:E176

I need to match all cells that contain M(onday) in column E on sheet1
and return the customer code that is in column G sheet1

Sheet 3 will be for W(ednesday)
Sheet 4 will be for F(riday)
Sheet 5 will be for S(aturday)


try it with VBA:

Sub Test()
Dim myRng As Range, c As Range
Dim varCheck As Variant
Dim FirstAddress As String
Dim i As Integer, n As Integer

varCheck = Array("M", "W", "F", "S")
Set myRng = Sheets("Sheet1").Range("E5:E176")

For i = LBound(varCheck) To UBound(varCheck)
n = 5
Set c = myRng.Find(varCheck(i), LookIn:=xlValues, lookat:=xlPart)
If Not c Is Nothing Then
FirstAddress = c.Address
Do
Sheets("Sheet" & i + 2).Cells(n, "E") = _
c.Offset(, 2)
n = n + 1
Set c = myRng.FindNext(c)
Loop While c.Address < FirstAddress
End If
Next
End Sub


Regards
Claus B.



Thanks, Claus - using starter 2010, VBA is not available. I made a
workaround by just making another table and just shading the cells for
each corresponding day. It serves my purpose.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Index Match

Hi,

Am Thu, 1 Feb 2018 17:30:10 -0600 schrieb leonard hofstatder:

Thanks, Claus - using starter 2010, VBA is not available. I made a
workaround by just making another table and just shading the cells for
each corresponding day. It serves my purpose.


filter the range E4:G176 by contains "M" for Monday and copy the
filtered list to the expected sheet. Repeat this for all your days.


Regards
Claus B.
--
Windows10
Office 2016
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
INDEX MATCH Functions in LibreCalc (Excel) - Non unique valuesreturn wrong index result io Excel Worksheet Functions 0 February 23rd 13 09:08 AM
Find Exact Match using INDEX, MATCH DoubleUU Excel Worksheet Functions 3 August 15th 08 02:42 PM
index(match) Wind Uplift Calculations (match four conditions) JMeier Excel Worksheet Functions 8 August 1st 08 01:45 AM
index match array function-returning only first match, need last. Julie Olsen Excel Worksheet Functions 3 December 29th 06 12:50 AM
index,match,match on un-sorted data Brisbane Rob Excel Worksheet Functions 3 September 24th 05 10:04 PM


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