Results 1 to 9 of 9
  1. #1
    Troll Killer and best Snooper!
    I decide when the pigs fly!
    Rhea's Avatar
    Join Date
    January 18th, 2005
    Location
    New York, USA
    Posts
    6,195
    Need Help with Excel
    Hello Kiddies,

    I hope someone knows how to do this. It should be something Excel would be able to do but I'm damned if I can figure out how to do it.

    I want to take the data in the "Product Title" field and call it into the "Product Image" field as alt text. Obviously it needs to write the called text into the destination field as I'm not using feeds dynamically.

    Which one of you geniuses knows how to do this, hmmm?

  2. #2
    Lone Ranger muddyboots's Avatar
    Join Date
    March 11th, 2005
    Location
    Asheville, NC
    Posts
    219
    Look into the "if" function in Excel. It's like this ...

    =if(this is true, put this value here, or else put this one here)

    It allows you to test for something and then vary the value of the current cell based on that.

    Let's say your product image is an cell a2 and your product name is in b2. And let's say we define a column that we'll label "newimage" in column c that will contain the value of the image, unless it's blank, in which case it will contain the value of the product name.

    Something like this goes in cell c2 (once it works, copy it all the way down the spreadsheet and all the references will change with it) ...

    =if(a2=" ",b2,a2)

    If a2 starts with a blank, the value in c2 will be the same as in b2, otherwise it will be the same as in a2.

    Do some testing because it might not test true as blank because it's null. One way around it is to test to see if the first character is not what you'd expect. It's probably "h" for "http://www.blahblah ..." for an imageurl. So if my first example does not work you can try ...

    =if(left(a2,1)<>"h",b2,a2)

    If the first character in a2 is not "h", c2 will be the same as b2, otherwise (if it is "h") it will be the same as a2 (the imageurl).

    Hope it helps.

  3. #3
    Troll Killer and best Snooper!
    I decide when the pigs fly!
    Rhea's Avatar
    Join Date
    January 18th, 2005
    Location
    New York, USA
    Posts
    6,195
    Thank you, Muddy Boots. I'm going to give it a whirl. UDABEST!

  4. #4
    Lone Ranger muddyboots's Avatar
    Join Date
    March 11th, 2005
    Location
    Asheville, NC
    Posts
    219
    Wink
    You're welcome. Happy to help.

  5. #5
    Internet Cowboy
    Join Date
    January 18th, 2005
    Posts
    4,662
    Rhea,
    Or you can create a new column like this, supposing the image link is column D and the title is column B, and your column titles populate row 1.
    =(D2&" alt="&B2)
    Enter this on a new column on row 2 and copy it down the length of the feed. It will create a new column merging columns D and B. Save it, close it and re-open it to see the new column as static and not the formula.


  6. #6
    ABW Ambassador buy_online's Avatar
    Join Date
    January 18th, 2005
    Location
    Richmond, VA
    Posts
    3,234
    Rhea, are you using WebMerge? If so, it might be easier to do it in your template. Otherwise, UncleScooter has a great solution (above).

    Fred

  7. #7
    Member infoscott's Avatar
    Join Date
    March 17th, 2005
    Posts
    126
    You'll want to use the TRIM() function if the description cell is not entirely empty (blank spaces). So if your candidate description is in A1, and image URL is in B1, then C1's formula would be:

    ="<img src='" & B1 & "'" & IF(TRIM(A1)="",">","alt='" & A1 & "'>")

    Blank spaces are the bane of fixed width datafeeds. It wouldn't be a bad idea to TRIM(A1) or TRIM(B1) in the declarative part of the formula, either.
    [LEFT]Scott :tartanber [URL=http://www.scotthamilton.net]My Vanity Page[/URL][/LEFT]

  8. #8
    Troll Killer and best Snooper!
    I decide when the pigs fly!
    Rhea's Avatar
    Join Date
    January 18th, 2005
    Location
    New York, USA
    Posts
    6,195
    I haven't had a chance to test drive the ideas you guys have given me. We're remodeling and between the racket the workers are making and the racket our dogs are making I haven't had any quiet time. I hope to try it out later today.

    No Webmerge here. Maybe it's time.

    Thank you all! I'll let you know how it goes.

  9. #9
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    Quote Originally Posted by Rhea
    No Webmerge here. Maybe it's time.
    One of the advantages of doing that sort of replacement in a WebMege template is that you set it up once and forget about it.

    The demo lets you process 20 records for free and has no timeout, so you can check it out at your leisure to see if it'll help with what you need:

    http://www.fourthworld.com/products/.../download.html
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  10. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Stripping " in Excel
    By bsnrjones in forum Programming / Datafeeds / Tools
    Replies: 3
    Last Post: November 4th, 2003, 04:20 PM
  2. Exporting with Excel
    By Tiebreaker in forum WebMerge (Fourthworld.com)
    Replies: 7
    Last Post: July 31st, 2003, 10:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •