WickedFire - Affiliate Marketing Forum - Internet Marketing Webmaster SEO Forum

Go Back   WickedFire - Affiliate Marketing Forum - Internet Marketing Webmaster SEO Forum > Free Section > Shooting The Shit

Shooting The Shit This is where the action is for all webmasters alike. Anything goes, seriously. Come meet and network with your peers, it's a fun way to take a break out of your busy day of posting at other boring forums.


Welcome to the WickedFire - Affiliate Marketing Forum - Internet Marketing Webmaster SEO Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-25-2008, 12:17 AM   #1 (permalink)
Haircut
 
rgordon83's Avatar
 
Join Date: Dec 2007
Posts: 965
iTrader: 4 / 100%
rgordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond repute
Question looking for Excel function that...

deletes entire ROWS that contain a certain keyword anywhere in the row(not just cell contents)

anyone know if this function exists and what it's called?
__________________
[EXCLUSIVE] Coupon for 20% off phpBay Pro

The Shully Mully
<----- My blog (Sorry, not one word about how to make money online).
rgordon83 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-26-2008, 05:12 AM   #2 (permalink)
Member
 
Join Date: Oct 2007
Posts: 71
iTrader: 0 / 0%
Skittled has a spectacular aura about
Sounds more database-y than excel-esque - could you import it into access/other database?

Long story short, not many functions can edit cells other than themselves, so deleting a row doesn't sound like a function thing. I know nothing about macros, but you/someone might, and I assume they could do the job.

Another alternative; export as CSV, write a quick program in your language of choice to do the dirty work, open up again in excel.
Skittled is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-26-2008, 05:46 AM   #3 (permalink)
Senior Member
 
Enigmabomb's Avatar
 
Join Date: Feb 2007
Posts: 632
iTrader: 1 / 100%
Enigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond repute
I second the CSV. One line of PHP along the lines of:

Your CSV:

Column1,Column2,Column3

PHP:
preg_replace('/\b,\b,YourValue.*?$/',"",file_get_contents($file));


In english: Search for a word, a comma, YourValue optionally followed by other things, as many of them as you'd like, until the end of the line.

This is untested, but should be close.
__________________
http://www.MyAuntIsHot.com
Web comedy designed to make you feel more normal.
Enigmabomb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-26-2008, 06:02 AM   #4 (permalink)
Senior Member
 
Enigmabomb's Avatar
 
Join Date: Feb 2007
Posts: 632
iTrader: 1 / 100%
Enigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond repute
Im feeling generous.

Here is your code, tested.

<?php

$g = "23,245,34\n35,23,12\n45,45,45";
$g = preg_replace("/\d*,\d*,45$/","",$g);

$g = "Joe,Jim,Rob\nJosh,Jon,Tom\n";
$g = preg_replace("/\w.*,\w.*,Rob/","",$g);

echo $g;

?>

The one caveat is it leaves blank lines where the old ones were, but that wont show up when you re-import to excel.
__________________
http://www.MyAuntIsHot.com
Web comedy designed to make you feel more normal.
Enigmabomb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-26-2008, 06:05 AM   #5 (permalink)
Senior Member
 
Enigmabomb's Avatar
 
Join Date: Feb 2007
Posts: 632
iTrader: 1 / 100%
Enigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond repute
Wait. Anywhere in the row?! Stand by...
__________________
http://www.MyAuntIsHot.com
Web comedy designed to make you feel more normal.
Enigmabomb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-26-2008, 06:16 AM   #6 (permalink)
Senior Member
 
Enigmabomb's Avatar
 
Join Date: Feb 2007
Posts: 632
iTrader: 1 / 100%
Enigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond repute
This is dirty, but it works.

$g = preg_replace("/(.*?)Rob(.*?)?/","",$g);
__________________
http://www.MyAuntIsHot.com
Web comedy designed to make you feel more normal.
Enigmabomb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-26-2008, 06:29 AM   #7 (permalink)
Senior Member
 
Enigmabomb's Avatar
 
Join Date: Feb 2007
Posts: 632
iTrader: 1 / 100%
Enigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond reputeEnigmabomb has a reputation beyond repute
Ok, that actually breaks if Rob starts the line. This works, but again, dirty.

$g = preg_replace("/^(.*?),?Rob,?(.*?)\n/","",$g);

Which in english reads:

If you have a start of the line, Followed by anything, then an optional comma (So in case we're first column) Then our search term Rob Followed by an optional comma (In case were last row) followed by anything until the line break, replace it with nothing.

Sorry about all the posts, but I cant edit after 10 mins. Please let me know how this works for you, I've spent some time on it, and the payoff will be hearing your results.
__________________
http://www.MyAuntIsHot.com
Web comedy designed to make you feel more normal.
Enigmabomb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-26-2008, 07:53 AM   #8 (permalink)
Senior Member
 
abhorrent's Avatar
 
Join Date: Feb 2008
Location: Illinois
Posts: 789
iTrader: 4 / 100%
abhorrent has a reputation beyond reputeabhorrent has a reputation beyond reputeabhorrent has a reputation beyond reputeabhorrent has a reputation beyond reputeabhorrent has a reputation beyond reputeabhorrent has a reputation beyond reputeabhorrent has a reputation beyond reputeabhorrent has a reputation beyond reputeabhorrent has a reputation beyond reputeabhorrent has a reputation beyond reputeabhorrent has a reputation beyond repute
This works.
Code:
Sub Find_YOUKEYWORD()
    Dim rng As Range
    Dim what As String
    what = "YOUKEYWORD"
    Do
        Set rng = ActiveSheet.UsedRange.Find(what)
        If rng Is Nothing Then
            Exit Do
        Else
            Rows(rng.Row).Delete
        End If
    Loop
End Sub
abhorrent is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-26-2008, 05:50 PM   #9 (permalink)
Gonna be riotch, biotch..
 
ImagesAndWords's Avatar
 
Join Date: Nov 2006
Location: Nørwåy
Posts: 1,694
iTrader: 0 / 0%
ImagesAndWords has a reputation beyond reputeImagesAndWords has a reputation beyond reputeImagesAndWords has a reputation beyond reputeImagesAndWords has a reputation beyond reputeImagesAndWords has a reputation beyond reputeImagesAndWords has a reputation beyond reputeImagesAndWords has a reputation beyond reputeImagesAndWords has a reputation beyond reputeImagesAndWords has a reputation beyond reputeImagesAndWords has a reputation beyond reputeImagesAndWords has a reputation beyond repute
I've actually looked for something like this in Excel too. Sometimes filtering or removing certain rows in Excel can be a biotch.
Thanks!
__________________
ImagesAndWords is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-27-2008, 01:30 AM   #10 (permalink)
Haircut
 
rgordon83's Avatar
 
Join Date: Dec 2007
Posts: 965
iTrader: 4 / 100%
rgordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond reputergordon83 has a reputation beyond repute
thanks Enigma and Abhorent +reps
__________________
[EXCLUSIVE] Coupon for 20% off phpBay Pro

The Shully Mully
<----- My blog (Sorry, not one word about how to make money online).
rgordon83 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-27-2008, 01:32 AM   #11 (permalink)
Goat Herder
 
LotsOfZeros's Avatar
 
Join Date: Feb 2008
Posts: 2,053
iTrader: 4 / 100%
LotsOfZeros has a reputation beyond reputeLotsOfZeros has a reputation beyond reputeLotsOfZeros has a reputation beyond reputeLotsOfZeros has a reputation beyond reputeLotsOfZeros has a reputation beyond reputeLotsOfZeros has a reputation beyond reputeLotsOfZeros has a reputation beyond reputeLotsOfZeros has a reputation beyond reputeLotsOfZeros has a reputation beyond reputeLotsOfZeros has a reputation beyond reputeLotsOfZeros has a reputation beyond repute
Quote:
Originally Posted by abhorrent View Post
This works.
Code:
Sub Find_YOUKEYWORD()
    Dim rng As Range
    Dim what As String
    what = "YOUKEYWORD"
    Do
        Set rng = ActiveSheet.UsedRange.Find(what)
        If rng Is Nothing Then
            Exit Do
        Else
            Rows(rng.Row).Delete
        End If
    Loop
End Sub
nice move
__________________
Make teh monies

Then Make More

"It's amazing the fool ever got together with the money in the first place"
~ Gordon Gecko

Quote:
Originally Posted by Deliguy View Post
rotfl I love the sound of a sigh indicating the world of logic and simple 2nd grade math just crumbled at the feet of idiots.



LotsOfZeros is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
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
IP Geo Targeting Function Brad101 Design, Development & Programming 12 03-24-2008 11:45 PM
Significance of backlinks with "link:" function on Google? Aveligand Newbie Questions 1 02-13-2008 07:05 AM
php function for splitting text? Stanley Design, Development & Programming 2 11-16-2007 04:49 PM
Excellent PHP Tips/Tricks/Techniques To Follow Aequitas Design, Development & Programming 47 10-16-2007 06:46 PM
Coding needed - on page search function nachoninja Design, Development & Programming 0 08-04-2007 08:20 PM


All times are GMT -4. The time now is 11:02 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
WickedFire.com Copyright © 2009 - WickedFire is an international registered Trademark of WickedFire LLC. You may not use any of our trademarks, copyrights, content, or images without a written approval by members of WickedFire LLC.