Hi Ashish, I am experiencing an issue with my macro file. There are 5 columns and 397 rows in my master worksheet. So i have created a macro file placing a search button in the one of the worksheet . Whenever a word is type and we hit search it brings us the result on the new worksheet, picking the results from the master worksheet. The issue i am getting is when searched anyword it somehow misses to capture all the results . For an example if there are 9 cells in the master sheet it will bring 7, if 16 then 11.
One of the observation i made is that from the mastersheet it copy paste the column which has "$D$15" and it skips "D40" (This i found out when i debugged the code. I cant share the file b its an official data. I am sharing code below. Private Sub Command21_click() Dim MyNewValue As Variant Dim FoundCell As Object Dim Counter As Long Dim Flag As Boolean Dim SearchString As Variant Dim NextRow As String Dim Arr () As String '------------------------------------------------- '- Initialise Components Flag = False Worksheets("Sector Results").Rows("2:" & Rows.Count).ClearContents Worksheets("Sector Results"). Visible = False '------------------------------------------------- '- SET SEARCH KEY SearchString = TextBox21.Value() If SearchString = "" Then End Counter = 0 '------------------------------------------------ '- FIND ALL MATCHING CELLS IN SECTOR KEYWORD SHEET On Error Resume Next Set ws = Worksheets("Sector Keywords").Range("A1:F500") Set FoundCell = ws.Cells.Find(what:=Searchstring, SearchOrder:=xlByRows, SearchDirection:=xlNext) Counter = 1 If Not FoundCell Is Nothing Then Do Counter = Counter + 1 NextRow = FoundCell.Address Arr = split (NextRow, "$") NexrRow = Arr(1) & Arr (2) + 1 '------------------------------------------- '- what to do if found FoundCell.EntireRow.Copy Destination:=Sheets("Sector Results").Cells (Counter, 1) '-------------------------------------------- Set ws = worksheets ("sector keywords"). Range (NextRow & ":F500") Set FoundCell = ws.Cells.Find(what:=SearchString, SearchOrder:=xlByRows, SearchDirection:=xlNext) Loop While Arr (2) < 800 Worksheets (''Sector Results"). Visible = True Worksheets (''Sector Results"). Activate Flag = True End If '-------------------------------------------- If Flag Then MsgBox ("Result Found") Else MsgBox ("No Result Found") End If End Sub Private Sub TextBox21_Change() Worksheets("Sector Results").Visible = False End Sub ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > On Tue, Apr 12, 2016 at 9:40 AM, Ashish Koul <koul.ash...@gmail.com> wrote: > paste words in sheet2 and change range as per ur requirement > > Sub loop_word() > Dim cl As Range > ' > For Each cl In Sheets("Sheet2").Range("a1:a2") > Call find_word(cl.Value) > Next > End Sub > > > Sub find_word(wrd) > 'https://msdn.microsoft.com/en-us/library/office/ff839746.aspx > > > With Worksheets("Sheet1").UsedRange > Set c = .Find(wrd, LookIn:=xlValues) > If Not c Is Nothing Then > firstAddress = c.Address > Do > c.Interior.Color = vbYellow > Set c = .FindNext(c) > Loop While Not c Is Nothing And c.Address <> firstAddress > End If > End With > > End Sub > > > On Tue, Apr 12, 2016 at 1:09 AM, Priyanka Jaswal < > priyankajaswal...@gmail.com> wrote: > >> In the below code , a word apple has been written , in my sheet i cant >> define words, it consists of 1000 words and i cant put any specific word, >> is there any way of to put it across like >> >> *Dim wordto find as string wordtofind=*" " >> , thanks >> On Monday, April 11, 2016, Ashish Koul <koul.ash...@gmail.com> wrote: >> >>> Sub sample() >>> 'https://msdn.microsoft.com/en-us/library/office/ff839746.aspx >>> Dim wordtofind As String >>> wordtofind = "apple" >>> >>> With Worksheets(1).UsedRange >>> Set c = .Find(wordtofind, LookIn:=xlValues) >>> If Not c Is Nothing Then >>> firstAddress = c.Address >>> Do >>> c.Interior.Color = vbYellow >>> Set c = .FindNext(c) >>> Loop While Not c Is Nothing And c.Address <> firstAddress >>> End If >>> End With >>> End Sub >>> >>> >>> On Mon, Apr 11, 2016 at 8:30 PM, Priyanka Jaswal < >>> priyankajaswal...@gmail.com> wrote: >>> >>>> I want to highlight that particular word so for example if there is a >>>> word retail in multiple columns and rows it should be highlighted with >>>> yellow color everywhr , only that word not a cell row or column, thanks >>>> >>>> >>>> On Monday, April 11, 2016, Ashish Koul <koul.ash...@gmail.com> wrote: >>>> >>>>> after match wht u wanna do highlight cell ? >>>>> >>>>> On Sun, Apr 10, 2016 at 10:04 PM, Priya <priyankajaswal...@gmail.com> >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I am writing a code to look for same word in the worksheets , where >>>>>> ever it is written in the worksheet, (basically need all the rows where >>>>>> that particular word is written ). The data is huge and I cant set a code >>>>>> specific to a word. The issue I am getting is that I only get one row >>>>>> from >>>>>> all the results, whereas there are multiple rows and columns which >>>>>> includes >>>>>> that particular keyword. Could you help. >>>>>> >>>>>> Private Sub CommandButton1_Click() >>>>>> Dim MyNewValue As Variant >>>>>> Dim FoundCell As Object >>>>>> Dim Counter As Long >>>>>> Dim Flag As Boolean >>>>>> Dim SearchString As Variant >>>>>> '------------------------------------------------- >>>>>> '- Initialise Components >>>>>> Flag = False >>>>>> Worksheets("Sector Results").Rows("2:" & Rows.Count).ClearContents >>>>>> Worksheets("Function Results").Rows("2:" & >>>>>> Rows.Count).ClearContents >>>>>> Worksheets("Sector Results").Visible = False >>>>>> Worksheets("Function Results").Visible = False >>>>>> '------------------------------------------------- >>>>>> '- SET SEARCH KEY >>>>>> SearchString = TextBox2.Value() >>>>>> If SearchString = "" Then End >>>>>> Counter = 0 >>>>>> >>>>>> '------------------------------------------------ >>>>>> '- FIND ALL MATCHING CELLS IN SECTOR KEYWORD SHEET >>>>>> On Error Resume Next >>>>>> Set ws = Worksheets("Sector Keywords").Range("B:E") >>>>>> Set FoundCell = ws.Cells.Find(what:=SearchString, >>>>>> SearchOrder:=xlByRows, SearchDirection:=xlNext) >>>>>> If Not FoundCell Is Nothing Then >>>>>> FirstAddress = FoundCell.Address >>>>>> Do >>>>>> Counter = Counter + 1 >>>>>> '-------------------------------------------- >>>>>> '- what to do if found >>>>>> FoundCell.EntireRow.Copy Destination:=Sheets("Sector >>>>>> Results").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) >>>>>> >>>>>> '-------------------------------------------- >>>>>> Set FoundCell = ws.Cells.Find(what:=SearchString, >>>>>> After:=FoundCell, SearchOrder:=xlByRows, SearchDirection:=xlNext) >>>>>> Loop While Not FoundCell Is Nothing _ >>>>>> And FoundCell.Address <> FirstAddress >>>>>> Worksheets("Sector Results").Visible = True >>>>>> >>>>>> Flag = True >>>>>> End If >>>>>> >>>>>> '------------------------------------------------ >>>>>> '- FIND ALL MATCHING CELLS IN FUNCTION KEYWORD SHEET >>>>>> Set ws = Worksheets("Function Keywords").Range("B:E") >>>>>> Set FoundCell = ws.Cells.Find(what:=SearchString) >>>>>> If Not FoundCell Is Nothing Then >>>>>> FirstAddress = FoundCell.Address >>>>>> Do >>>>>> Counter = Counter + 1 >>>>>> '-------------------------------------------- >>>>>> '- what to do if found >>>>>> FoundCell.EntireRow.Copy Destination:=Sheets("Function >>>>>> Results").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) >>>>>> >>>>>> '-------------------------------------------- >>>>>> Set FoundCell = ws.Cells.FindNext(FoundCell) >>>>>> Loop While Not FoundCell Is Nothing _ >>>>>> And FoundCell.Address <> FirstAddress >>>>>> Worksheets("Function Results").Visible = True >>>>>> Worksheets("Function Results").Activate >>>>>> Flag = True >>>>>> End If >>>>>> >>>>>> If Flag Then >>>>>> MsgBox ("Result Found") >>>>>> Else >>>>>> MsgBox ("No Result Found") >>>>>> End If >>>>>> End Sub >>>>>> >>>>>> Private Sub TextBox2_Change() >>>>>> Worksheets("Sector Results").Visible = False >>>>>> >>>>>> End Sub >>>>>> >>>>>> -- >>>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? >>>>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >>>>>> https://www.facebook.com/discussexcel >>>>>> >>>>>> FORUM RULES >>>>>> >>>>>> 1) Use concise, accurate thread titles. Poor thread titles, like >>>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need >>>>>> Advice will not get quick attention or may not be answered. >>>>>> 2) Don't post a question in the thread of another member. >>>>>> 3) Don't post questions regarding breaking or bypassing any security >>>>>> measure. >>>>>> 4) Acknowledge the responses you receive, good or bad. >>>>>> 5) Jobs posting is not allowed. >>>>>> 6) Sharing copyrighted material and their links is not allowed. >>>>>> >>>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners >>>>>> and members are not responsible for any loss. >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "MS EXCEL AND VBA MACROS" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to excel-macros+unsubscr...@googlegroups.com. >>>>>> To post to this group, send email to excel-macros@googlegroups.com. >>>>>> Visit this group at https://groups.google.com/group/excel-macros. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> *Regards* >>>>> >>>>> *Ashish Koul* >>>>> >>>>> >>>>> *Visit* >>>>> http://www.excelvbamacros.in >>>>> Like Us on Facebook <https://www.facebook.com/excelvbacodes> >>>>> Join Us on Facebook <http://www.facebook.com/groups/163491717053198/> >>>>> >>>>> >>>>> P Before printing, think about the environment. >>>>> >>>>> >>>>> >>>>> -- >>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? >>>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >>>>> https://www.facebook.com/discussexcel >>>>> >>>>> FORUM RULES >>>>> >>>>> 1) Use concise, accurate thread titles. Poor thread titles, like >>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need >>>>> Advice will not get quick attention or may not be answered. >>>>> 2) Don't post a question in the thread of another member. >>>>> 3) Don't post questions regarding breaking or bypassing any security >>>>> measure. >>>>> 4) Acknowledge the responses you receive, good or bad. >>>>> 5) Jobs posting is not allowed. >>>>> 6) Sharing copyrighted material and their links is not allowed. >>>>> >>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners >>>>> and members are not responsible for any loss. >>>>> --- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "MS EXCEL AND VBA MACROS" group. >>>>> To unsubscribe from this topic, visit >>>>> https://groups.google.com/d/topic/excel-macros/dam-mSWx45E/unsubscribe >>>>> . >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> excel-macros+unsubscr...@googlegroups.com. >>>>> To post to this group, send email to excel-macros@googlegroups.com. >>>>> Visit this group at https://groups.google.com/group/excel-macros. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- >>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? >>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >>>> https://www.facebook.com/discussexcel >>>> >>>> FORUM RULES >>>> >>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please >>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >>>> will not get quick attention or may not be answered. >>>> 2) Don't post a question in the thread of another member. >>>> 3) Don't post questions regarding breaking or bypassing any security >>>> measure. >>>> 4) Acknowledge the responses you receive, good or bad. >>>> 5) Jobs posting is not allowed. >>>> 6) Sharing copyrighted material and their links is not allowed. >>>> >>>> NOTE : Don't ever post confidential data in a workbook. Forum owners >>>> and members are not responsible for any loss. >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "MS EXCEL AND VBA MACROS" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to excel-macros+unsubscr...@googlegroups.com. >>>> To post to this group, send email to excel-macros@googlegroups.com. >>>> Visit this group at https://groups.google.com/group/excel-macros. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> *Regards* >>> >>> *Ashish Koul* >>> >>> >>> *Visit* >>> http://www.excelvbamacros.in >>> Like Us on Facebook <https://www.facebook.com/excelvbacodes> >>> Join Us on Facebook <http://www.facebook.com/groups/163491717053198/> >>> >>> >>> P Before printing, think about the environment. >>> >>> >>> >>> -- >>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? >>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >>> https://www.facebook.com/discussexcel >>> >>> FORUM RULES >>> >>> 1) Use concise, accurate thread titles. Poor thread titles, like Please >>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >>> will not get quick attention or may not be answered. >>> 2) Don't post a question in the thread of another member. >>> 3) Don't post questions regarding breaking or bypassing any security >>> measure. >>> 4) Acknowledge the responses you receive, good or bad. >>> 5) Jobs posting is not allowed. >>> 6) Sharing copyrighted material and their links is not allowed. >>> >>> NOTE : Don't ever post confidential data in a workbook. Forum owners and >>> members are not responsible for any loss. >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "MS EXCEL AND VBA MACROS" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/excel-macros/dam-mSWx45E/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> excel-macros+unsubscr...@googlegroups.com. >>> To post to this group, send email to excel-macros@googlegroups.com. >>> Visit this group at https://groups.google.com/group/excel-macros. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s >> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >> https://www.facebook.com/discussexcel >> >> FORUM RULES >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> 2) Don't post a question in the thread of another member. >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> 4) Acknowledge the responses you receive, good or bad. >> 5) Jobs posting is not allowed. >> 6) Sharing copyrighted material and their links is not allowed. >> >> NOTE : Don't ever post confidential data in a workbook. Forum owners and >> members are not responsible for any loss. >> --- >> You received this message because you are subscribed to the Google Groups >> "MS EXCEL AND VBA MACROS" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to excel-macros+unsubscr...@googlegroups.com. >> To post to this group, send email to excel-macros@googlegroups.com. >> Visit this group at https://groups.google.com/group/excel-macros. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > *Regards* > > *Ashish Koul* > > > *Visit* > http://www.excelvbamacros.in > Like Us on Facebook <https://www.facebook.com/excelvbacodes> > Join Us on Facebook <http://www.facebook.com/groups/163491717053198/> > > > P Before printing, think about the environment. > > > > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to a topic in the > Google Groups "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/excel-macros/dam-mSWx45E/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at https://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > On Tue, Apr 12, 2016 at 9:40 AM, Ashish Koul <koul.ash...@gmail.com> wrote: > paste words in sheet2 and change range as per ur requirement > > Sub loop_word() > Dim cl As Range > ' > For Each cl In Sheets("Sheet2").Range("a1:a2") > Call find_word(cl.Value) > Next > End Sub > > > Sub find_word(wrd) > 'https://msdn.microsoft.com/en-us/library/office/ff839746.aspx > > > With Worksheets("Sheet1").UsedRange > Set c = .Find(wrd, LookIn:=xlValues) > If Not c Is Nothing Then > firstAddress = c.Address > Do > c.Interior.Color = vbYellow > Set c = .FindNext(c) > Loop While Not c Is Nothing And c.Address <> firstAddress > End If > End With > > End Sub > > > On Tue, Apr 12, 2016 at 1:09 AM, Priyanka Jaswal < > priyankajaswal...@gmail.com> wrote: > >> In the below code , a word apple has been written , in my sheet i cant >> define words, it consists of 1000 words and i cant put any specific word, >> is there any way of to put it across like >> >> *Dim wordto find as string wordtofind=*" " >> , thanks >> On Monday, April 11, 2016, Ashish Koul <koul.ash...@gmail.com> wrote: >> >>> Sub sample() >>> 'https://msdn.microsoft.com/en-us/library/office/ff839746.aspx >>> Dim wordtofind As String >>> wordtofind = "apple" >>> >>> With Worksheets(1).UsedRange >>> Set c = .Find(wordtofind, LookIn:=xlValues) >>> If Not c Is Nothing Then >>> firstAddress = c.Address >>> Do >>> c.Interior.Color = vbYellow >>> Set c = .FindNext(c) >>> Loop While Not c Is Nothing And c.Address <> firstAddress >>> End If >>> End With >>> End Sub >>> >>> >>> On Mon, Apr 11, 2016 at 8:30 PM, Priyanka Jaswal < >>> priyankajaswal...@gmail.com> wrote: >>> >>>> I want to highlight that particular word so for example if there is a >>>> word retail in multiple columns and rows it should be highlighted with >>>> yellow color everywhr , only that word not a cell row or column, thanks >>>> >>>> >>>> On Monday, April 11, 2016, Ashish Koul <koul.ash...@gmail.com> wrote: >>>> >>>>> after match wht u wanna do highlight cell ? >>>>> >>>>> On Sun, Apr 10, 2016 at 10:04 PM, Priya <priyankajaswal...@gmail.com> >>>>> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> I am writing a code to look for same word in the worksheets , where >>>>>> ever it is written in the worksheet, (basically need all the rows where >>>>>> that particular word is written ). The data is huge and I cant set a code >>>>>> specific to a word. The issue I am getting is that I only get one row >>>>>> from >>>>>> all the results, whereas there are multiple rows and columns which >>>>>> includes >>>>>> that particular keyword. Could you help. >>>>>> >>>>>> Private Sub CommandButton1_Click() >>>>>> Dim MyNewValue As Variant >>>>>> Dim FoundCell As Object >>>>>> Dim Counter As Long >>>>>> Dim Flag As Boolean >>>>>> Dim SearchString As Variant >>>>>> '------------------------------------------------- >>>>>> '- Initialise Components >>>>>> Flag = False >>>>>> Worksheets("Sector Results").Rows("2:" & Rows.Count).ClearContents >>>>>> Worksheets("Function Results").Rows("2:" & >>>>>> Rows.Count).ClearContents >>>>>> Worksheets("Sector Results").Visible = False >>>>>> Worksheets("Function Results").Visible = False >>>>>> '------------------------------------------------- >>>>>> '- SET SEARCH KEY >>>>>> SearchString = TextBox2.Value() >>>>>> If SearchString = "" Then End >>>>>> Counter = 0 >>>>>> >>>>>> '------------------------------------------------ >>>>>> '- FIND ALL MATCHING CELLS IN SECTOR KEYWORD SHEET >>>>>> On Error Resume Next >>>>>> Set ws = Worksheets("Sector Keywords").Range("B:E") >>>>>> Set FoundCell = ws.Cells.Find(what:=SearchString, >>>>>> SearchOrder:=xlByRows, SearchDirection:=xlNext) >>>>>> If Not FoundCell Is Nothing Then >>>>>> FirstAddress = FoundCell.Address >>>>>> Do >>>>>> Counter = Counter + 1 >>>>>> '-------------------------------------------- >>>>>> '- what to do if found >>>>>> FoundCell.EntireRow.Copy Destination:=Sheets("Sector >>>>>> Results").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) >>>>>> >>>>>> '-------------------------------------------- >>>>>> Set FoundCell = ws.Cells.Find(what:=SearchString, >>>>>> After:=FoundCell, SearchOrder:=xlByRows, SearchDirection:=xlNext) >>>>>> Loop While Not FoundCell Is Nothing _ >>>>>> And FoundCell.Address <> FirstAddress >>>>>> Worksheets("Sector Results").Visible = True >>>>>> >>>>>> Flag = True >>>>>> End If >>>>>> >>>>>> '------------------------------------------------ >>>>>> '- FIND ALL MATCHING CELLS IN FUNCTION KEYWORD SHEET >>>>>> Set ws = Worksheets("Function Keywords").Range("B:E") >>>>>> Set FoundCell = ws.Cells.Find(what:=SearchString) >>>>>> If Not FoundCell Is Nothing Then >>>>>> FirstAddress = FoundCell.Address >>>>>> Do >>>>>> Counter = Counter + 1 >>>>>> '-------------------------------------------- >>>>>> '- what to do if found >>>>>> FoundCell.EntireRow.Copy Destination:=Sheets("Function >>>>>> Results").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) >>>>>> >>>>>> '-------------------------------------------- >>>>>> Set FoundCell = ws.Cells.FindNext(FoundCell) >>>>>> Loop While Not FoundCell Is Nothing _ >>>>>> And FoundCell.Address <> FirstAddress >>>>>> Worksheets("Function Results").Visible = True >>>>>> Worksheets("Function Results").Activate >>>>>> Flag = True >>>>>> End If >>>>>> >>>>>> If Flag Then >>>>>> MsgBox ("Result Found") >>>>>> Else >>>>>> MsgBox ("No Result Found") >>>>>> End If >>>>>> End Sub >>>>>> >>>>>> Private Sub TextBox2_Change() >>>>>> Worksheets("Sector Results").Visible = False >>>>>> Worksheets("Function Results").Visible = False >>>>>> End Sub >>>>>> >>>>>> -- >>>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? >>>>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >>>>>> https://www.facebook.com/discussexcel >>>>>> >>>>>> FORUM RULES >>>>>> >>>>>> 1) Use concise, accurate thread titles. Poor thread titles, like >>>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need >>>>>> Advice will not get quick attention or may not be answered. >>>>>> 2) Don't post a question in the thread of another member. >>>>>> 3) Don't post questions regarding breaking or bypassing any security >>>>>> measure. >>>>>> 4) Acknowledge the responses you receive, good or bad. >>>>>> 5) Jobs posting is not allowed. >>>>>> 6) Sharing copyrighted material and their links is not allowed. >>>>>> >>>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners >>>>>> and members are not responsible for any loss. >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "MS EXCEL AND VBA MACROS" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to excel-macros+unsubscr...@googlegroups.com. >>>>>> To post to this group, send email to excel-macros@googlegroups.com. >>>>>> Visit this group at https://groups.google.com/group/excel-macros. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> *Regards* >>>>> >>>>> *Ashish Koul* >>>>> >>>>> >>>>> *Visit* >>>>> http://www.excelvbamacros.in >>>>> Like Us on Facebook <https://www.facebook.com/excelvbacodes> >>>>> Join Us on Facebook <http://www.facebook.com/groups/163491717053198/> >>>>> >>>>> >>>>> P Before printing, think about the environment. >>>>> >>>>> >>>>> >>>>> -- >>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? >>>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >>>>> https://www.facebook.com/discussexcel >>>>> >>>>> FORUM RULES >>>>> >>>>> 1) Use concise, accurate thread titles. Poor thread titles, like >>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need >>>>> Advice will not get quick attention or may not be answered. >>>>> 2) Don't post a question in the thread of another member. >>>>> 3) Don't post questions regarding breaking or bypassing any security >>>>> measure. >>>>> 4) Acknowledge the responses you receive, good or bad. >>>>> 5) Jobs posting is not allowed. >>>>> 6) Sharing copyrighted material and their links is not allowed. >>>>> >>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners >>>>> and members are not responsible for any loss. >>>>> --- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "MS EXCEL AND VBA MACROS" group. >>>>> To unsubscribe from this topic, visit >>>>> https://groups.google.com/d/topic/excel-macros/dam-mSWx45E/unsubscribe >>>>> . >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> excel-macros+unsubscr...@googlegroups.com. >>>>> To post to this group, send email to excel-macros@googlegroups.com. >>>>> Visit this group at https://groups.google.com/group/excel-macros. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- >>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? >>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >>>> https://www.facebook.com/discussexcel >>>> >>>> FORUM RULES >>>> >>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please >>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >>>> will not get quick attention or may not be answered. >>>> 2) Don't post a question in the thread of another member. >>>> 3) Don't post questions regarding breaking or bypassing any security >>>> measure. >>>> 4) Acknowledge the responses you receive, good or bad. >>>> 5) Jobs posting is not allowed. >>>> 6) Sharing copyrighted material and their links is not allowed. >>>> >>>> NOTE : Don't ever post confidential data in a workbook. Forum owners >>>> and members are not responsible for any loss. >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "MS EXCEL AND VBA MACROS" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to excel-macros+unsubscr...@googlegroups.com. >>>> To post to this group, send email to excel-macros@googlegroups.com. >>>> Visit this group at https://groups.google.com/group/excel-macros. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> *Regards* >>> >>> *Ashish Koul* >>> >>> >>> *Visit* >>> http://www.excelvbamacros.in >>> Like Us on Facebook <https://www.facebook.com/excelvbacodes> >>> Join Us on Facebook <http://www.facebook.com/groups/163491717053198/> >>> >>> >>> P Before printing, think about the environment. >>> >>> >>> >>> -- >>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? >>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >>> https://www.facebook.com/discussexcel >>> >>> FORUM RULES >>> >>> 1) Use concise, accurate thread titles. Poor thread titles, like Please >>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >>> will not get quick attention or may not be answered. >>> 2) Don't post a question in the thread of another member. >>> 3) Don't post questions regarding breaking or bypassing any security >>> measure. >>> 4) Acknowledge the responses you receive, good or bad. >>> 5) Jobs posting is not allowed. >>> 6) Sharing copyrighted material and their links is not allowed. >>> >>> NOTE : Don't ever post confidential data in a workbook. Forum owners and >>> members are not responsible for any loss. >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "MS EXCEL AND VBA MACROS" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/excel-macros/dam-mSWx45E/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> excel-macros+unsubscr...@googlegroups.com. >>> To post to this group, send email to excel-macros@googlegroups.com. >>> Visit this group at https://groups.google.com/group/excel-macros. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s >> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ >> https://www.facebook.com/discussexcel >> >> FORUM RULES >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> 2) Don't post a question in the thread of another member. >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> 4) Acknowledge the responses you receive, good or bad. >> 5) Jobs posting is not allowed. >> 6) Sharing copyrighted material and their links is not allowed. >> >> NOTE : Don't ever post confidential data in a workbook. Forum owners and >> members are not responsible for any loss. >> --- >> You received this message because you are subscribed to the Google Groups >> "MS EXCEL AND VBA MACROS" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to excel-macros+unsubscr...@googlegroups.com. >> To post to this group, send email to excel-macros@googlegroups.com. >> Visit this group at https://groups.google.com/group/excel-macros. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > *Regards* > > *Ashish Koul* > > > *Visit* > http://www.excelvbamacros.in > Like Us on Facebook <https://www.facebook.com/excelvbacodes> > Join Us on Facebook <http://www.facebook.com/groups/163491717053198/> > > > P Before printing, think about the environment. > > > > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to a topic in the > Google Groups "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/excel-macros/dam-mSWx45E/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at https://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at https://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.