Suggestions for building and managing complex functions in Excel [closed] - excel

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Far too often, I've got a formula that wraps functions inside of functions inside of functions, and when some new condition requires that I wrap another function around it, I often find myself completely losing track of which parentheses go where, which function applies to which set of parameters and usually find myself debugging a statement for a half hour after my modification produces unexpected results.
What I've BEEN doing is to cut the function into its individual parts in a column...each row representing a single function, and when I'm satisfied that end result is what it needs to be, I copy each piece back into it's respective spot in the preceding cell until I have a completed, and hopefully working, function.
CONSIDER:
=IF((ISERROR((VLOOKUP(D2,$A$2:$A9,1,0))),(IF((D2=(VLOOKUP(D2,$A$2:$A$9,1,0))),0,D2)),E2)
0 =IF((ISERROR((VLOOKUP(D2,$A$2:$A9,1,0))),L17,E2)
TRUE =ISERROR((VLOOKUP(D2,$A$2:$A9,1,0))
0 =IF((D2=L18),0,D2)
the =VLOOKUP(D2,$A$2:$A$9,1,0)
It'd be great to be able to document inline or have something similar to a VBA popup ion which to edit formulae, but since that doesn't exist, I'd be interested to know what other techniques for effectively building complex functions you've found helpful. Thoughts?

Normally, I split formulas over multiple columns - each column then contains a part of the formula. I never stuck them into a single cell - while "cleaner" they are impossible to debug.
If the columns are to much, I build a "admin" sheet, which can be hidden.
I dislike the excel formula editor in general - while I really like the power of the formulas, the editor is a pain to use.

Related

How do I select and return all rows in excel with the same value is a particular column [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 days ago.
Improve this question
I want to return all rows in a particular dataset, with the value in a particular column. Without writing multiple vlookup statements and manually filtering the data. Can I do this using VBA, where it selects the data and creates new excel workbooks with this data?
I tried indexing, but it doesn't quite do what I want

Is there a way to quickly check what attribute the data is in a cell in a spreadsheet? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last month.
Improve this question
I know we can easily convert or change the attribute to of data in a cell quickly and there are shortcuts for it but is there a way to check if a data or list of data in a column is saved as an int/string/date/etc?
I would like to be able to just quickly check if the data I have in a column is saved in the correct format/attribute without having to convert/change it again just to make sure.
Excel will make assumptions of what the data is automatically. There is no datatype like in python or other coding languages. There are functions for testing cells values.
Functions to look at istext(), isblank(), isnumber(), islogical(), iserr(), ...
so if you want to know the data type in B5.
=IFS(ISTEXT(B5),"String",ISBLANK(B5),"Null",ISNUMBER(B5),"Number",ISLOGICAL(B5),"Boolean",ISERR(B5),"Error")
To convert a number to a string use the single quote mark prior to the number like '50. A date in excel is also a number. To convert a number stored as a string into a number multiply by 1.
Edit---
There is a fuction =Cell() see the details here
=CELL("format",B5)

Delete rows between certain values [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 9 months ago.
Improve this question
I'd like make a task for my work way more simple, but in pretty lost since I'm just starting to learn VBA.
What I wanna make easier is a process of removing certaing data from an excel sheet.
Please, see the image, I think it's easier to understand.
I'd like to ask for an input of a market in column P. Let's say the user enters "Portugal". Then it would look for the rows that have that value in column P and delete the ones that doesn't contain information for Portugal (e.g. it would delete rows from 6 to 9 and 21 to 25, but rows 2-5 and 10-20 should not be deleted).
Any good ideas? I think it should be simple somehow but I can't think of any solution.
Thanks
Let me teach you some Excel magic:
Select the entire column "P".
Press Ctrl+G , choose "Special" and then "Blanks".
Click in the address bar and type =P2.
Press Ctrl+ENTER (don't forget the Ctrl button!)
This should fill in the "P" column as you desire and from then on, you can use the basic autofilter.

Using Excel to verify entries [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am looking for a way to automate checking a demographic sheet filled in by a trainee against an answer key.
Our sheet currently has data validation built in to return TRUE or FALSE on whether the answer matches the answer key, but I'm looking for a way to then display the exact text string, so as to provide feedback on the exact error.
For example the way it currently functions is:
Sheet1!A1=Cat
Sheet2!A1=Dog
Sheet3!A1=FALSE
What I'm looking for, is a to utilize VBA to generate a comment balloon on Sheet3!A1 and see the exact error for easier feedback.
I'm new to working with advanced functions in Excel, so if anyone has a pointer in the right direction, I would greatly appreciate it!!
I Suppose your want to check Sheet1 = Sheet2 in sheet3, and show the error if does not match.
To make it simple, just use formula in sheet 3,
=IF(Sheet1!A1=Sheet2!A1,"",Sheet1!A1 & "|" &Sheet2!A1)
if they match, nothing will be show, if they don't match, it will show Sheet1figure|Sheet2figure
this is easier than showing True/False

EXCEL spreadsheet -- matrices product term by term [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have two table with figures with dimension 9*9. I would like to compute
sum(aij*bij) over j
with obvious notation with one formula only.
For now, I am first computing a 9*9 table filled with aij*bij in each cell, and then in a new column I am doing a sum over columns of values in this 9*9 table. It is two step. I would like to do that in one step to save space and time.
What is syntax ?
Thanks
You should be able to use SUMPRODUCT formulas to sum products over columns.
If your original arrays are in ranges A1:I9 and K1:S9, then the first entry in your result array would be =SUMPRODUCT(A1:I1, K1:S1). Copying this formula down for eight rows more gives you the rest of the result elements..
Summing the products over all elements would be even easier: SUMPRODUCT(A1:I9,K1:S9)
Another approach here - use array SUM formula: =SUM(A1:I1*K1:S1). However, as you type it into cell, press CTRL+SHIFT+ENTER instead of usual ENTER. As a result, this formula will be displayed as {=SUM(A1:I1*K1:S1)} - brackets indicate that this is an array formula. However, they should NOT be manually added.
#chuff answer is absolutely correct and I upvoted it, but using array formulas has at least 1 advantage: with them you may do much more magic tricks which are not / hardly implemented using SUMPRODUCT or any similar functions.
Please also see Remark section there: http://office.microsoft.com/en-001/excel-help/sumproduct-HP005209293.aspx
Use this sample file as a demo for both solutions: https://www.dropbox.com/s/0xr8iif920uqpqf/SUMPRODUCT.xlsx
Choose any solution which is more suitable for you! (:

Resources