{"id":3928,"date":"2016-01-28T03:00:30","date_gmt":"2016-01-28T08:00:30","guid":{"rendered":"https:\/\/digitalreadymarketing.com\/?p=3928"},"modified":"2017-06-15T15:44:37","modified_gmt":"2017-06-15T19:44:37","slug":"return-output-depending-input-excel","status":"publish","type":"post","link":"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/","title":{"rendered":"How To Return Different Output Depending On The Input In Excel?"},"content":{"rendered":"<p>Ever since I became a SEO consultant, I am forced to have Excel as\u00a0my best friend. I had been using Excel since I was in college but never realized how many different functions Excel had.<\/p>\n<p>So, in order for us to run a successful online business, Excel is a must. This is why once in awhile I am going <a href=\"https:\/\/digitalreadymarketing.com\/tag\/excel\/\" target=\"_blank\">to post useful Excel functions<\/a>\u00a0as I come across.<\/p>\n<p>While developing a <a href=\"https:\/\/digitalreadymarketing.com\/revenue-prediction-model-amazon-affiliate-income\/\" target=\"_blank\">revenue prediction model for Amazon affiliate income<\/a>, I came across to a need to use an excel formula to output a different number depending on the input.<\/p>\n<p>Basically, Amazon pays its affiliates different percentages depending on how many goods they sell within that month.<\/p>\n<p>The challenge is to make excel utilize different commision according to the predicted number of goods sold.<\/p>\n<p>In other words, if the prediction model says 100 items will be sold that month, the equation needs to pull &#8220;6.5%&#8221; commission for calculation (see table below).<\/p>\n<p><a href=\"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2016\/01\/Amazon-affiliate-commision-table.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-3929\" src=\"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2016\/01\/Amazon-affiliate-commision-table.png\" alt=\"Amazon affiliate commision table\" width=\"261\" height=\"208\" \/><\/a><\/p>\n<p>After researching the web, there are various ways to do this and I ended up settling with <a href=\"https:\/\/www.ablebits.com\/office-addins-blog\/2014\/12\/03\/excel-if-function-iferrror-ifna\/\" target=\"_blank\">IF (a,b,c) &amp; IF (d,e,f)<\/a>. It basically adds a string of &#8220;IF&#8221; equations by using &#8220;&amp;&#8221; sign.<\/p>\n<p>In addition, I also needed to specify the range of the number of items sold for each commision level. This is where the <a href=\"http:\/\/www.experiglot.com\/2006\/12\/11\/how-to-use-nested-if-statements-in-excel-with-and-or-not\/\" target=\"_blank\">&#8220;AND&#8221; function<\/a> comes in.<\/p>\n<p>So by combining the two, the formula looks like this.<\/p>\n<pre class=\"lang:default decode:true\">IF(AND(C9&gt;=$G$5,C9&lt;=$H$5),$I$5,\"\")&amp;IF(AND(C9&gt;=$G$6,C9&lt;=$H$6),$I$6,\"\")<\/pre>\n<p>If we translate the formula into English it&#8217;s something like, &#8220;If the number of item sold is between 1 and 6, display 4%, if not blank&#8221; &amp; &#8220;If the number of item sold is between 11 and 30, display 6%, if not blank&#8221;.<\/p>\n<p>The screenshot below shows what it looks like in Excel.<\/p>\n<p><a href=\"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2016\/01\/The-if-formula-used-for-amazon-affiliate-income-prediction.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-3930\" src=\"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2016\/01\/The-if-formula-used-for-amazon-affiliate-income-prediction.png\" alt=\"The if formula used for amazon affiliate income prediction\" width=\"1158\" height=\"368\" srcset=\"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2016\/01\/The-if-formula-used-for-amazon-affiliate-income-prediction.png 1158w, https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2016\/01\/The-if-formula-used-for-amazon-affiliate-income-prediction-300x95.png 300w, https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2016\/01\/The-if-formula-used-for-amazon-affiliate-income-prediction-1024x325.png 1024w\" sizes=\"(max-width: 1158px) 100vw, 1158px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Reference<\/h3>\n<p><a href=\"https:\/\/www.ablebits.com\/office-addins-blog\/2014\/12\/03\/excel-if-function-iferrror-ifna\/\" target=\"_blank\">https:\/\/www.ablebits.com\/office-addins-blog\/2014\/12\/03\/excel-if-function-iferrror-ifna\/<\/a><\/p>\n<p><a href=\"http:\/\/www.experiglot.com\/2006\/12\/11\/how-to-use-nested-if-statements-in-excel-with-and-or-not\/\" target=\"_blank\">http:\/\/www.experiglot.com\/2006\/12\/11\/how-to-use-nested-if-statements-in-excel-with-and-or-not\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever since I became a SEO consultant, I am forced to have Excel as\u00a0my best friend. I had been using Excel since I was in college but never realized how many different functions Excel had. So, in order for us to run a successful online business, Excel is a must. This is why once in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3867,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[39],"class_list":["post-3928","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-seo","tag-excel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to return different output depending on the input in Excel? - Digital Ready Marketing<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to return different output depending on the input in Excel? - Digital Ready Marketing\" \/>\n<meta property=\"og:description\" content=\"Ever since I became a SEO consultant, I am forced to have Excel as\u00a0my best friend. I had been using Excel since I was in college but never realized how many different functions Excel had. So, in order for us to run a successful online business, Excel is a must. This is why once in [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/\" \/>\n<meta property=\"og:site_name\" content=\"Digital Ready Marketing\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-28T08:00:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-06-15T19:44:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2015\/12\/excel-icon.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"1964\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Tony\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@digitalreadyseo\" \/>\n<meta name=\"twitter:site\" content=\"@digitalreadyseo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tony\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/\",\"url\":\"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/\",\"name\":\"How to return different output depending on the input in Excel? - Digital Ready Marketing\",\"isPartOf\":{\"@id\":\"https:\/\/digitalreadymarketing.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2015\/12\/excel-icon.png\",\"datePublished\":\"2016-01-28T08:00:30+00:00\",\"dateModified\":\"2017-06-15T19:44:37+00:00\",\"author\":{\"@id\":\"https:\/\/digitalreadymarketing.com\/#\/schema\/person\/9900d9fa92bb16a33df4968eaf2b37c1\"},\"breadcrumb\":{\"@id\":\"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/#primaryimage\",\"url\":\"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2015\/12\/excel-icon.png\",\"contentUrl\":\"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2015\/12\/excel-icon.png\",\"width\":2000,\"height\":1964,\"caption\":\"excel icon\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/digitalreadymarketing.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Return Different Output Depending On The Input In Excel?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/digitalreadymarketing.com\/#website\",\"url\":\"https:\/\/digitalreadymarketing.com\/\",\"name\":\"Digital Ready Marketing\",\"description\":\"We Help The Small Guys To Win Big\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/digitalreadymarketing.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/digitalreadymarketing.com\/#\/schema\/person\/9900d9fa92bb16a33df4968eaf2b37c1\",\"name\":\"Tony\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/digitalreadymarketing.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bd8bce009f3fd9e503ce6beb631f2892?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bd8bce009f3fd9e503ce6beb631f2892?s=96&d=mm&r=g\",\"caption\":\"Tony\"},\"description\":\"I am an SEO consultant who happens to be interested in affiliate marketing. I build websites and use them for testing various SEO strategies and tactics. LinkedIn Profile\",\"url\":\"https:\/\/digitalreadymarketing.com\/author\/tony\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to return different output depending on the input in Excel? - Digital Ready Marketing","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/","og_locale":"en_US","og_type":"article","og_title":"How to return different output depending on the input in Excel? - Digital Ready Marketing","og_description":"Ever since I became a SEO consultant, I am forced to have Excel as\u00a0my best friend. I had been using Excel since I was in college but never realized how many different functions Excel had. So, in order for us to run a successful online business, Excel is a must. This is why once in [&hellip;]","og_url":"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/","og_site_name":"Digital Ready Marketing","article_published_time":"2016-01-28T08:00:30+00:00","article_modified_time":"2017-06-15T19:44:37+00:00","og_image":[{"width":2000,"height":1964,"url":"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2015\/12\/excel-icon.png","type":"image\/png"}],"author":"Tony","twitter_card":"summary_large_image","twitter_creator":"@digitalreadyseo","twitter_site":"@digitalreadyseo","twitter_misc":{"Written by":"Tony","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/","url":"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/","name":"How to return different output depending on the input in Excel? - Digital Ready Marketing","isPartOf":{"@id":"https:\/\/digitalreadymarketing.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/#primaryimage"},"image":{"@id":"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2015\/12\/excel-icon.png","datePublished":"2016-01-28T08:00:30+00:00","dateModified":"2017-06-15T19:44:37+00:00","author":{"@id":"https:\/\/digitalreadymarketing.com\/#\/schema\/person\/9900d9fa92bb16a33df4968eaf2b37c1"},"breadcrumb":{"@id":"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/#primaryimage","url":"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2015\/12\/excel-icon.png","contentUrl":"https:\/\/digitalreadymarketing.com\/wp-content\/uploads\/2015\/12\/excel-icon.png","width":2000,"height":1964,"caption":"excel icon"},{"@type":"BreadcrumbList","@id":"https:\/\/digitalreadymarketing.com\/return-output-depending-input-excel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/digitalreadymarketing.com\/"},{"@type":"ListItem","position":2,"name":"How To Return Different Output Depending On The Input In Excel?"}]},{"@type":"WebSite","@id":"https:\/\/digitalreadymarketing.com\/#website","url":"https:\/\/digitalreadymarketing.com\/","name":"Digital Ready Marketing","description":"We Help The Small Guys To Win Big","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/digitalreadymarketing.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/digitalreadymarketing.com\/#\/schema\/person\/9900d9fa92bb16a33df4968eaf2b37c1","name":"Tony","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/digitalreadymarketing.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/bd8bce009f3fd9e503ce6beb631f2892?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bd8bce009f3fd9e503ce6beb631f2892?s=96&d=mm&r=g","caption":"Tony"},"description":"I am an SEO consultant who happens to be interested in affiliate marketing. I build websites and use them for testing various SEO strategies and tactics. LinkedIn Profile","url":"https:\/\/digitalreadymarketing.com\/author\/tony\/"}]}},"_links":{"self":[{"href":"https:\/\/digitalreadymarketing.com\/wp-json\/wp\/v2\/posts\/3928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalreadymarketing.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalreadymarketing.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalreadymarketing.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalreadymarketing.com\/wp-json\/wp\/v2\/comments?post=3928"}],"version-history":[{"count":0,"href":"https:\/\/digitalreadymarketing.com\/wp-json\/wp\/v2\/posts\/3928\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digitalreadymarketing.com\/wp-json\/wp\/v2\/media\/3867"}],"wp:attachment":[{"href":"https:\/\/digitalreadymarketing.com\/wp-json\/wp\/v2\/media?parent=3928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalreadymarketing.com\/wp-json\/wp\/v2\/categories?post=3928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalreadymarketing.com\/wp-json\/wp\/v2\/tags?post=3928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}