Cumbersome formula

Excellis

New Member
Joined
Oct 30, 2012
Messages
25
Office Version
  1. 2016
Platform
  1. Windows
I have created an embedded IF formula to take care of several possible but slightly different results, the formula works but it looks clumsy & cumbersome and my not even be the right way to do it. If any one can help tidy it up I'd be extremely grateful. I've tried to anonymise my example by using similar data to the actual data.


A typical shop code might be 014 Newtown or 626 Oldtown

=IF(LEFT(H11,3)*1>144,"sto"&LEFT(H11,3)*1&"x@myshop.com",IF(LEFT(H11,3)*1<10,"stor00"&LEFT(H11,3)*1&"x@myshop.com",IF(LEFT(H11,3)*1>99,"stor"&LEFT(H11,3)*1&"x@myshop.com","stor"&0&LEFT(H11,3)*1&"x@myshop.com")))

A typical shop code might be 014 Newtown or 626 Oldtown

What I'm trying to achieve is this:


Any shop that has a reference code 001 to 009 I want to see (example) stor004x@myshop.com
Any shop that has a reference code 010 to 099 I want to see (example) stor064x@myshop.com
Any shop that has a reference code 100 to 144 I want to see (example) stor110x@myshop.com
Any shop that has a reference code >144 I want to see (example) sto540@myshop.com

I'm sorry but I don't know how to attach an example spreadsheet.

Thank you in anticipation

Tom
 
Thank you for your suggestion. I did consider using something similar but this is a weekly report and it would mean recreating or copy/pasting the table weekly whereas I can 'hide' the formula in the report and it's just there to paste into every line. Thanks again.
Thanks for your consideration but it is totally my fault. My suggestion doesn't meet your needs.
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,215,410
Messages
6,124,756
Members
449,187
Latest member
hermansoa

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