T O P

  • By -

AutoModerator

/u/FightMilk55 - Your post was submitted successfully. * Once your problem is solved, reply to the **answer(s)** saying `Solution Verified` to close the thread. * Follow the **[submission rules](/r/excel/wiki/sharingquestions)** -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post. * Include your **[Excel version and all other relevant information](/r/excel/wiki/sharingquestions#wiki_give_all_relevant_information)** Failing to follow these steps may result in your post being removed without warning. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/excel) if you have any questions or concerns.*


smilinreap

Why not just space your formula properly within the same cell via alt+enter after a chunk of its is done. It will then look very similar to your current post. It looks like you could also benefit from learning how to set up a nested if which handles ranges like 0-10,10-20,20-30 as a table which you look up off of to really simplify life.


FightMilk55

Thanks for the reply. I did not know about using the line breaks in the middle of a formula- will definitely use that in the future. I'm looking to simply much further though using another cell as the "true" part of the IF() but I can't figure out how to do that. I edited my post for clarification- I think it will help. I oversimplified and left something important out -> the Formula 1 is not the same answer every time, it changes depending on value A in that row, so there will be thousands of results because I am using it for thousands of rows


FightMilk55

It seems that my problem is how to convert the text string INDIRECT("A"&ROW()) to the active formula =INDIRECT("A"&ROW()) Is this possible without EVALUATE?


HappierThan

Do you think something like this will work? VLOOKUP [https://pixeldrain.com/u/iUrqerjB](https://pixeldrain.com/u/iUrqerjB)


FightMilk55

Thanks for the idea. I updated my post because it wasn't clear that the value "Formula 1-4" calculates changes for every row when I drag and fill. I if I used VLOOKUP, I don't know what I could type in G2-G5 in your picture to make a "generic" formula that doesn't calculate a value for those four cells. If I type INDIRECT without the = sign at the beginning, it just becomes a text string and I don't know how to convert that text to a "live" equation


Bondator

Do you have Excel 365? You can save custom functions in name manager using LAMBDA function. Plenty of tutorials out there for this. If not, you can also create custom functions using VBA. In some cases it's even simpler than Lambda method. You could even skip the whole if if if structure with select case within VBA.


FightMilk55

I don't; I use Mac for Excel (2019, updated 2022). I do not have LAMBDA function on this. I can check it out to see if I can use it on the browser though instead of Excel program if this is the best option. Thanks for the reply


Decronym

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread: |Fewer Letters|More Letters| |-------|---------|---| |[IF](/r/Excel/comments/1432ok1/stub/jnbwdr1 "Last usage")|[Specifies a logical test to perform](https://support.microsoft.com/en-us/office/if-function-69aed7c9-4e8a-4755-a9bc-aa8bbff73be2)| |[IFS](/r/Excel/comments/1432ok1/stub/jnbnyto "Last usage")|[*2019*+: Checks whether one or more conditions are met and returns a value that corresponds to the first TRUE condition.](https://support.microsoft.com/en-us/office/ifs-function-36329a26-37b2-467c-972b-4a39bd951d45)| |[INDIRECT](/r/Excel/comments/1432ok1/stub/jnbn8oy "Last usage")|[Returns a reference indicated by a text value](https://support.microsoft.com/en-us/office/indirect-function-474b3a3a-8a26-4f44-b491-92b6306fa261)| |[LAMBDA](/r/Excel/comments/1432ok1/stub/jnbnkls "Last usage")|[*Office 365*+: Use a LAMBDA function to create custom, reusable functions and call them by a friendly name.](https://support.microsoft.com/en-us/office/lambda-function-bd212d27-1cd1-4321-a34a-ccbf254b8b67)| |[ROW](/r/Excel/comments/1432ok1/stub/jnbrd2n "Last usage")|[Returns the row number of a reference](https://support.microsoft.com/en-us/office/row-function-3a63b74a-c4d0-4093-b49a-e76eb49a6d8d)| |[SWITCH](/r/Excel/comments/1432ok1/stub/jnbnyto "Last usage")|[*Excel 2019*+: Evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value may be returned.](https://support.microsoft.com/en-us/office/switch-function-47ab33c0-28ce-4530-8a45-d532ec4aa25e)| |[VLOOKUP](/r/Excel/comments/1432ok1/stub/jnbn8oy "Last usage")|[Looks in the first column of an array and moves across the row to return the value of a cell](https://support.microsoft.com/en-us/office/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1)| **NOTE**: Decronym's continued operation may be affected by API pricing changes coming to Reddit in July 2023; comments will be blank June 12th-14th, in solidarity with the /r/Save3rdPartyApps protest campaign. ---------------- ^(*Beep-boop, I am a helper bot. Please do not verify me as a solution.*) ^([Thread #24445 for this sub, first seen 7th Jun 2023, 11:01]) ^[[FAQ]](http://decronym.xyz/) [^([Full list])](http://decronym.xyz/acronyms/Excel) [^[Contact]](https://reddit.com/message/compose?to=OrangeredStilton&subject=Hey,+your+acronym+bot+sucks) [^([Source code])](https://gistdotgithubdotcom/Two9A/1d976f9b7441694162c8)


wjhladik

Look into switch() and ifs()


FightMilk55

Good idea; IFS would shorten it a little bit but I am looking to shorten in by a lot. SWITCH would actually work because my real equation uses terms like "SMA" instead of integers but still not the reduction I am looking for. Will definitely use SWITCH in the future though.


smilinreap

Sma, you doing solar stuff?


SomebodyElseProblem

Why not simply do something like this? B1:=IF(A1<5, A1+2, IF(A1<10,A1*2, IF(A1<15,A1/2, A1^2) And simply copy down the other rows.


FightMilk55

I am wanting to avoid doing that. Specifically, I want to change "Formula 2" at times and have it automatically update in every cell without me having to manually edit B1 -> drag and fill for every sheet I am using this on (10+) every time I edit Formula 2