+ Reply to Thread
Results 1 to 10 of 10

formula to wrap a cell input in preset wording for that cell

  1. #1
    Registered User
    Join Date
    10-29-2014
    Location
    NO VA
    MS-Off Ver
    2007
    Posts
    4

    formula to wrap a cell input in preset wording for that cell

    I'm new to excel, so if this is not a formula question, then I apologize. I'm not sure what the proper wording is for what I need. I'm building a spreadsheet that will import data into a website. One of the columns will hold shortcodes for woocommerce. An example of a cell in that column looks like this

    [products skus="liberty, june, abbadabbado" orderby="name" order="desc"]

    The only thing in the above that will change in each row is liberty, june, abbadabbado. Is there a way to make the

    [products skus=" " orderby="name" order="desc"]

    permanent and only show when I type the info in the cell? So if the next cell in that column was

    abby, firstfrost, neptune

    all I would have to do is type in those three words and it would be wrapped in

    [products skus="abby, firstfrost, neptune" orderby="name" order="desc"]

    and if nothing was in that cell it would remain blank?
    Last edited by monkeyswcrayons; 10-29-2014 at 07:49 PM.

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Noob, looking for possible formula solution

    If you want it to be in the cell you've typed then you'll need to create s function which runs on the cell being changed, if however you're happy to have the data entered in A1 say but the answer appear in B1 then the following in B1 will work:
    ="[products skus=" & chr(34) & A1 & chr(34) & " orderby=" & chr(34) & "name" & chr(34) & " order=" & chr(34) "desc" & chr(34) & "]"

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,969

    Re: Noob, looking for possible formula solution

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    09-16-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Noob, looking for possible formula solution

    Hi,
    I am not a super excel guru unlike most adavances user on this site who are really good in helping and has lot of excel experience.

    but i was curious to post my first reply.

    May this formula will help.

    ="[products skus="""&LEFT(I1,FIND(", ",I1,1)-1)&", "&TRIM(MID(I1,FIND(", ",I1,1)+1,(FIND(", ",I1,FIND(", ",I1,1)+1)-(FIND(", ",I1,1)+1))))&", "&TRIM(RIGHT(I1,LEN(I1)-FIND(", ",I1,FIND(", ",I1,1)+1)))&"""" &" orderby="""&"name"""& " order="""&"desc"""&"]"

    its quite long. but it works ( even in 2003 excel). Type abby, firstfrost, neptune in cell I1 and then copy paste this formula in another cell.
    Let me know if work or not. thanks.

  5. #5
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Noob, looking for possible formula solution

    Nirav,

    If the user is typing "Abby, firstfrost, Neptune" then why do you need to strip out the commas To then just reinput them?

  6. #6
    Registered User
    Join Date
    09-16-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: formula to wrap a cell input in preset wording for that cell

    pjwhitfield,

    yes you are correct.in that case it will be more simple then.

  7. #7
    Registered User
    Join Date
    10-29-2014
    Location
    NO VA
    MS-Off Ver
    2007
    Posts
    4

    Re: Noob, looking for possible formula solution

    I get that you are a moderator and doing what you do. But if I state that I'm a noob, and don't know what the proper wording is for what I need done, how exactly do you expect me to change the subject line to fit into your forum rules? I'm ignorant on the subject and don't know how to concisely describe my problem. I changed it to what I thought would more concisely describe my issue, but it will probably confuse most as I don't know how to word it. Thank you for the welcome! Might help noobs if you give them examples of how to reword there issue concisely. Or is this just an automated thing that pics up on generated forum no no's and not a person behind the post?

  8. #8
    Registered User
    Join Date
    10-29-2014
    Location
    NO VA
    MS-Off Ver
    2007
    Posts
    4

    Re: Noob, looking for possible formula solution

    Pjwhitfield - It would be perfect to have everything go in A1, and show up in B1. When I copied and pasted that into B1 to test it, got an error message though. Was I supposed to do another step with the copy and paste?

    Nirav - I tried it, and it gave me a value error message. Again should I be doing something other than copy and paste?

  9. #9
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: formula to wrap a cell input in preset wording for that cell

    What was the error message?

  10. #10
    Registered User
    Join Date
    10-29-2014
    Location
    NO VA
    MS-Off Ver
    2007
    Posts
    4

    Re: formula to wrap a cell input in preset wording for that cell

    Error: formula parse error - is what it says.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel Noob Needs Help With a Formula!
    By Drew Pickles in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-14-2014, 10:21 PM
  2. [SOLVED] Noob To R1C1 format, New Formula Received and I Need Help Please.
    By DHartwig35805 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-12-2013, 04:04 PM
  3. Noob question - How to edit a formula across workbooks - shortcut?
    By webbt01 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-04-2012, 07:45 PM
  4. [SOLVED] Conditional Formatting Formula needed for noob
    By Patrick Byrne in forum Excel General
    Replies: 1
    Last Post: 04-04-2012, 05:48 PM
  5. Noob help with a formula
    By tmmgem in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-12-2008, 03:03 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1