$$Excel-Macros$$ Find value in Active Cell in another sheet(s) delete

2011-06-04 Thread sswcharlie
Hi

Part of a another code -

I want to find the value(text) in active cell (value changes often) in
workbook (except current WS and one other worksheet 'home) and
delete. Could be more than one instance.


Thanks

Charlie

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ Find value in Active Cell in another sheet(s) delete

2011-06-04 Thread STDEV(i)
please check and try this VBA code if it helps

Sub DoSomething()
*   ' siti Vi*
   Dim w As Worksheet, xCel As Range
   Dim sCriteria As String

   sCriteria = MyCriteriaText  ' please edit
   For Each w In Worksheets
  If Not w.Name = ActiveSheet.Name Then
 If Not LCase(w.Name) = home Then
For Each xCel In w.UsedRange
   If xCel.Value = sCriteria Then xCel.Clear
Next xCel
 End If
  End If
   Next w
End Sub


On Sat, Jun 4, 2011 at 11:47 AM, sswcharlie swch...@gmail.com wrote:

 Hi
 Part of a another code -
 I want to find the value(text) in active cell (value changes often) in
 workbook (except current WS and one other worksheet 'home) and
 delete. Could be more than one instance.

 Thanks
 Charlie



-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ Find value in Active Cell in another sheet(s) delete

2011-06-04 Thread GoldenLance
Just a minor tweak to STDEV(i)'s code. Based on the original subject,
I might change sCriteria = MyCriteriaText to sCriteria =
ActiveCell.Value

On Jun 4, 2:24 pm, STDEV(i) setiyowati.d...@gmail.com wrote:
 please check and try this VBA code if it helps

 Sub DoSomething()
 *   ' siti Vi*
    Dim w As Worksheet, xCel As Range
    Dim sCriteria As String

    sCriteria = MyCriteriaText  ' please edit
    For Each w In Worksheets
       If Not w.Name = ActiveSheet.Name Then
          If Not LCase(w.Name) = home Then
             For Each xCel In w.UsedRange
                If xCel.Value = sCriteria Then xCel.Clear
             Next xCel
          End If
       End If
    Next w
 End Sub







 On Sat, Jun 4, 2011 at 11:47 AM, sswcharlie swch...@gmail.com wrote:
  Hi
  Part of a another code -
  I want to find the value(text) in active cell (value changes often) in
  workbook (except current WS and one other worksheet 'home) and
  delete. Could be more than one instance.

  Thanks
  Charlie

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ Find value in Active Cell in another sheet(s) delete

2011-06-04 Thread STDEV(i)
Dear GoldenLance,

Thank you very much for your great sugestion..

user just *selects/activates a cell* where the criteria is written, and run
the macro...

kindest regards,
STDEV(i)


On Sat, Jun 4, 2011 at 5:57 PM, GoldenLance samde...@gmail.com wrote:

 Just a minor tweak to STDEV(i)'s code. Based on the original subject,
 I might change *sCriteria* = MyCriteriaText to sCriteria = *
 ActiveCell.Value*

 On Jun 4, 2:24 pm, STDEV(i) setiyowati.d...@gmail.com wrote:
  please check and try this VBA code if it helps
 
  Sub DoSomething()
  *   ' siti Vi*
 Dim w As Worksheet, xCel As Range
 Dim sCriteria As String
 
 sCriteria = MyCriteriaText  ' please edit
 For Each w In Worksheets
If Not w.Name = ActiveSheet.Name Then
   If Not LCase(w.Name) = home Then
  For Each xCel In w.UsedRange
 If xCel.Value = sCriteria Then xCel.Clear
  Next xCel
   End If
End If
 Next w
  End Sub
 
 
  On Sat, Jun 4, 2011 at 11:47 AM, sswcharlie swch...@gmail.com wrote:
   Hi
   Part of a another code -
   I want to find the value(text) in active cell (value changes often) in
   workbook (except current WS and one other worksheet 'home) and
   delete. Could be more than one instance.
   Thanks
   Charlie



-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ Find value in Active Cell in another sheet(s) delete

2011-06-04 Thread sswcharlie
Hi Guys

Thanks for that - magic.  I understand now how it works.

Thanks

Charlie

On Jun 5, 12:04 pm, STDEV(i) setiyowati.d...@gmail.com wrote:
 Dear GoldenLance,

 Thank you very much for your great sugestion..

 user just *selects/activates a cell* where the criteria is written, and run
 the macro...

 kindest regards,
 STDEV(i)



 On Sat, Jun 4, 2011 at 5:57 PM, GoldenLance samde...@gmail.com wrote:
  Just a minor tweak to STDEV(i)'s code. Based on the original subject,
  I might change *sCriteria* = MyCriteriaText to sCriteria = *
  ActiveCell.Value*

  On Jun 4, 2:24 pm, STDEV(i) setiyowati.d...@gmail.com wrote:
   please check and try this VBA code if it helps

   Sub DoSomething()
   *   ' siti Vi*
      Dim w As Worksheet, xCel As Range
      Dim sCriteria As String

      sCriteria = MyCriteriaText  ' please edit
      For Each w In Worksheets
         If Not w.Name = ActiveSheet.Name Then
            If Not LCase(w.Name) = home Then
               For Each xCel In w.UsedRange
                  If xCel.Value = sCriteria Then xCel.Clear
               Next xCel
            End If
         End If
      Next w
   End Sub

   On Sat, Jun 4, 2011 at 11:47 AM, sswcharlie swch...@gmail.com wrote:
Hi
Part of a another code -
I want to find the value(text) in active cell (value changes often) in
workbook (except current WS and one other worksheet 'home) and
delete. Could be more than one instance.
Thanks
Charlie- Hide quoted text -

 - Show quoted text -

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel