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 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, 01:17 AM   #1 (permalink)
it's a wig
 
rgordon83's Avatar
 
Join Date: Dec 2007
Posts: 1,313
iTrader: 5 / 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?
__________________
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam cursus. Morbi ut mi. Nullam enim leo, egestas id, condimentum at, laoreet mattis, massa.
rgordon83 is offline  
Old 07-26-2008, 06:12 AM   #2 (permalink)
Member
 
Join Date: Oct 2007
Posts: 86
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  
Old 07-26-2008, 06:46 AM   #3 (permalink)
Banned
 
Enigmabomb's Avatar
 
Join Date: Feb 2007
Posts: 1,916
iTrader: 11 / 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.
__________________
SEO Keyword Tracking For Professionals (Or just a slob with clients)
How To Write Link Bait
Stop moving in slow motion:Full Speed SEO
Enigmabomb is offline  
Old 07-26-2008, 07:02 AM   #4 (permalink)
Banned
 
Enigmabomb's Avatar
 
Join Date: Feb 2007
Posts: 1,916
iTrader: 11 / 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.
__________________
SEO Keyword Tracking For Professionals (Or just a slob with clients)
How To Write Link Bait
Stop moving in slow motion:Full Speed SEO
Enigmabomb is offline  
Old 07-26-2008, 07:05 AM   #5 (permalink)
Banned
 
Enigmabomb's Avatar
 
Join Date: Feb 2007
Posts: 1,916
iTrader: 11 / 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...
__________________
SEO Keyword Tracking For Professionals (Or just a slob with clients)
How To Write Link Bait
Stop moving in slow motion:Full Speed SEO
Enigmabomb is offline  
Old 07-26-2008, 07:16 AM   #6 (permalink)
Banned
 
Enigmabomb's Avatar
 
Join Date: Feb 2007
Posts: 1,916
iTrader: 11 / 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);
__________________
SEO Keyword Tracking For Professionals (Or just a slob with clients)
How To Write Link Bait
Stop moving in slow motion:Full Speed SEO
Enigmabomb is offline  
Old 07-26-2008, 07:29 AM   #7 (permalink)
Banned
 
Enigmabomb's Avatar
 
Join Date: Feb 2007
Posts: 1,916
iTrader: 11 / 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.
__________________
SEO Keyword Tracking For Professionals (Or just a slob with clients)
How To Write Link Bait
Stop moving in slow motion:Full Speed SEO
Enigmabomb is offline  
Old 07-26-2008, 08: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  
Old 07-26-2008, 06:50 PM   #9 (permalink)
Gonna be riotch, biotch..
 
ImagesAndWords's Avatar
 
Join Date: Nov 2006
Location: Wåshingtøn Ståte
Posts: 2,183
iTrader: 1 / 100%
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  
Old 07-27-2008, 02:30 AM   #10 (permalink)
it's a wig
 
rgordon83's Avatar
 
Join Date: Dec 2007
Posts: 1,313
iTrader: 5 / 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
__________________
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam cursus. Morbi ut mi. Nullam enim leo, egestas id, condimentum at, laoreet mattis, massa.
rgordon83 is offline  
Old 07-27-2008, 02:32 AM   #11 (permalink)
^^^ Bi-Winning ^^^
 
LotsOfZeros's Avatar
 
Join Date: Feb 2008
Posts: 4,669
iTrader: 6 / 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
__________________
"Concentrated power has always been the enemy of liberty" ~ Ronald Reagan

Quote:
Originally Posted by hellblazer View Post
And subigo's stalkerish obsession with the Hannity forums and conservatives in general is fairly disturbing. You get the impression he's sitting in the dark somewhere furiously masterbating to the Hannity threads, his sallow complexion dimly lit by the glow of the computer monitor as he creepily cackles to himself.





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


All times are GMT -4. The time now is 06:28 AM.


WickedFire.com Copyright © 2011 - WickedFire is an international registered Trademark of Coastal Synergy LLC. You may not use any of our trademarks, copyrights, content, or images without a written approval by members of Coastal Synergy LLC.

Search Engine Optimization by vBSEO 3.6.0