Shorter Formulas Possible?

Charlie

Board Regular
Joined
Mar 1, 2002
Messages
134
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
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,037
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top