Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Shorter Formulas Possible?

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    134
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am using these formulas and would like to know if there is any way of shortening them without affecting the result.

    1st one: =IF(Sheet2!$M$9="N/A","Sorry Newhaven to Dieppe is not available.","Crossing By Route, "&INDEX(Crossing_Option,Sheet2!$E$27,1)&" "&TEXT(Sheet2!$O$9,"0.00"))

    2nd One: =IF(Sheet2!$M$9="N/A"," ",Sheet2!$E$25&" nights at, Hotel "&INDEX(Hotels_List,Sheet2!$E$23,1)&" "&TEXT(Sheet2!$O$8,"0.00"))

    Thanks


  2. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,993
    Post Thanks / Like
    Mentioned
    37 Post(s)
    Tagged
    6 Thread(s)

    Default

    On 2002-04-25 13:32, Charlie wrote:
    I am using these formulas and would like to know if there is any way of shortening them without affecting the result.

    1st one: =IF(Sheet2!$M$9="N/A","Sorry Newhaven to Dieppe is not available.","Crossing By Route, "&INDEX(Crossing_Option,Sheet2!$E$27,1)&" "&TEXT(Sheet2!$O$9,"0.00"))

    2nd One: =IF(Sheet2!$M$9="N/A"," ",Sheet2!$E$25&" nights at, Hotel "&INDEX(Hotels_List,Sheet2!$E$23,1)&" "&TEXT(Sheet2!$O$8,"0.00"))

    Thanks
    You could give short but intelligble names to the relevant cells and use these names in your formulas. Also, the text bits can be put in named cells of their own and these names substituted in the appropriate places in the formulas.



  3. #3
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-25 13:32, Charlie wrote:
    I am using these formulas and would like to know if there is any way of shortening them without affecting the result.

    1st one: =IF(Sheet2!$M$9="N/A","Sorry Newhaven to Dieppe is not available.","Crossing By Route, "&INDEX(Crossing_Option,Sheet2!$E$27,1)&" "&TEXT(Sheet2!$O$9,"0.00"))

    2nd One: =IF(Sheet2!$M$9="N/A"," ",Sheet2!$E$25&" nights at, Hotel "&INDEX(Hotels_List,Sheet2!$E$23,1)&" "&TEXT(Sheet2!$O$8,"0.00"))

    Thanks

    Without looking at whether the formulas can be made more efficient, you can:

    Name your formulas *and* name the text strings.

    example:
    TEXT(Sheet2!$O$9,"0.00")) could be given a name referenced in the formula. This would be in the "RefersTo" part.

    also, the following could be given short names

    Insert>Name>MyString1
    Refers to:
    ="Sorry Newhaven to Dieppe is not available."

    Wherever you see that text, replace it with MyString1.

    Definitely would shorten the formulas above.

    Bye,
    Jay

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Posts
    134
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks I will give em a try.
    Charlie

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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