Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I am trying to search through Column A for group name and match this with persons name in col B then output a value in column C. Here is my macro thus far. Note same person can appear in both groups - help needed & appreciated Sub Group_Locate() Dim Counter As Integer Dim strFund As String Counter = 1 strFund = Cells(Counter, 1).Value While strFund < Empty And Counter < 5000 Select Case strFund Case "GroupA" And Cells(Counter, Counter + 1) = "Terence Darby": Cells(Counter, Counter + 3).Value = 15 'Case "GroupB" And Cells(Counter, Counter + 1) = "Jonny Butler": Cells(Counter, Counter + 3).Value = 22 'Case "GroupA" And Cells(Counter, Counter + 1) = "Jonny Butler": Cells(Counter, Counter + 3).Value = 61 Case Else: End Select Counter = Counter + 1 strFund = Cells(Counter, 4).Value Wend End Sub E.g run macro over belowData: Cell A1 = GroupA Cell B1 = Terence Darby Cell A2 = Group A Cell B2 = Jonny Butler Result in Col C1 = 15 Result in Col C2 = 61 Thanks George |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to use spellnumber formula | Excel Worksheet Functions | |||
Currency to Text | Excel Worksheet Functions | |||
How to .. | Excel Discussion (Misc queries) | |||
convert value in word. For Exampe Rs.115.00 convert into word as . | Excel Discussion (Misc queries) | |||
Is there a formula to spell out a number in excel? | Excel Worksheet Functions |