ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Usenet Groups > Excel 2007 Help

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-16-2008, 11:16 AM
sip sip is offline
Registered User
 
Join Date: 16 Jul 2008
Location: UK
Posts: 8
sip is on a distinguished road
advanced find and replace/apend

Hi

i am working with datafeeds and i want to change some of the contents of the fields based on other fields.

example field j is a product name but it contains some extraneous info on the end.
example "sony television - extended warranty 1234"

and field M contains the actual information i want about the warranty
example "3 years parts and labour + first 1 year onsite"

What i want to do is process the whole workshet so that it takes everything in field J up to the first hyphen and adds it to the start of field M so the resulting field M would be

"sony television - 3 years parts and labour + first 1 year onsite"

I would also want this to be selective so it only did that on a row where field J has the text "sony television" in it.

Thanks in advance for your replies

Sip
Reply With Quote
  #2  
Old 07-16-2008, 11:23 AM
daddylonglegs's Avatar
daddylonglegs daddylonglegs is offline
Forum Moderator
 
Join Date: 14 Jan 2006
Location: England
Posts: 4,920
daddylonglegs will become famous soon enough daddylonglegs will become famous soon enough
For row 2 perhaps try

=IF(COUNTIF(J2,"sony television*"),"sony television - "&M2,"")
Reply With Quote
  #3  
Old 07-16-2008, 03:14 PM
sip sip is offline
Registered User
 
Join Date: 16 Jul 2008
Location: UK
Posts: 8
sip is on a distinguished road
i think that would do for the one row. i would ideally want to have one query for all the rows however and i guess a sort of wildcard that picks up whatever is in row j up to the first hyphen.

i think i sort of explained it wrong in the first post

basically take everything from line j up to the first hyphen in that line and add it to the start of line M

not sure if that makes sense.
Reply With Quote
  #4  
Old 07-16-2008, 03:20 PM
NBVC's Avatar
NBVC NBVC is online now
Forum Moderator
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
Posts: 7,613
NBVC will become famous soon enough NBVC will become famous soon enough
How about:

=LEFT(J2,FIND("-",J2)+1)&M2 copied down...

... but you did say you wanted only the ones with sony television in it to have that concatenation to occur which is what DLL was providing...
__________________
Where there is a will there are many ways. Finding one that works for you is the challenge!

Please read the Forum Rules: Rules
Reply With Quote
  #5  
Old 07-16-2008, 04:10 PM
sip sip is offline
Registered User
 
Join Date: 16 Jul 2008
Location: UK
Posts: 8
sip is on a distinguished road
Quote:
Originally Posted by NBVC
How about:

=LEFT(J2,FIND("-",J2)+1)&M2 copied down...

... but you did say you wanted only the ones with sony television in it to have that concatenation to occur which is what DLL was providing...
ill try that now thanks

I know i did say that in the first post. i am bit of a noob at this so still working out what it is i need i think. thanks for the quick replies though. really great forum.
Reply With Quote
  #6  
Old 07-16-2008, 04:19 PM
sip sip is offline
Registered User
 
Join Date: 16 Jul 2008
Location: UK
Posts: 8
sip is on a distinguished road
that worked perfectly.

Could you please direct me to a post or quick guide which would explain how to copy it down. I apologise for my very noobie questions but i guess i have to start somewhere.

thanks again for your reply
Reply With Quote
  #7  
Old 07-16-2008, 04:25 PM
NBVC's Avatar
NBVC NBVC is online now
Forum Moderator
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
Posts: 7,613
NBVC will become famous soon enough NBVC will become famous soon enough
You can simply copy the cell that the formula is in..

select the remainder of the range and paste.

or ...

you can click and hold the little black square at the bottom right corner of the cell with the formula in it.... and drag that down as far as you need.
__________________
Where there is a will there are many ways. Finding one that works for you is the challenge!

Please read the Forum Rules: Rules
Reply With Quote
  #8  
Old 07-16-2008, 04:48 PM
sip sip is offline
Registered User
 
Join Date: 16 Jul 2008
Location: UK
Posts: 8
sip is on a distinguished road
brilliant. that worked perfectly.

Is there a way of using IF statements for cells also?

for instance

if k = "sony television" then x = http://www.thumbnail

or something similar.

I want to create a field which points to a thumbnail image by URL but i obviously need to make sure i use the correct thumbnail.

any suggestions on how best to do this would be most welcome

thanks again
Reply With Quote
  #9  
Old 07-16-2008, 04:55 PM
NBVC's Avatar
NBVC NBVC is online now
Forum Moderator
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
Posts: 7,613
NBVC will become famous soon enough NBVC will become famous soon enough
You probably need to create a table of all the items and corresponding url's then use a vlookup() formula (see Vlookup in Excel help) to extract the appropriate URL.

e.g

=Vlookup(K2,$X$1:$Y$100,2,FALSE)

this would look up the item in K2 in table occupied by X1:Y100 and find the corresponding item in column Y... and put it in the cell with the formula....

To make it an active hyperlink...surround formula with Hyperlink() function...

=Hyperlink(Vlookup(K2,$X$1:$Y$100,2,FALSE))
__________________
Where there is a will there are many ways. Finding one that works for you is the challenge!

Please read the Forum Rules: Rules
Reply With Quote
  #10  
Old 07-16-2008, 10:00 PM
sip sip is offline
Registered User
 
Join Date: 16 Jul 2008
Location: UK
Posts: 8
sip is on a distinguished road
think i need a little extra info on using vlookup. i dont quite follow that last post all the way through.

can you suggest a guide or tutorial on using vlookup across multiple worksheets?

thanks
Reply With Quote
Reply

Bookmarks

New topics in Excel 2007 Help


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -4. The time now is 12:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0