Excel - Entering Values Automatically into Cells/Columns upon Changing Another Cell Value - excel

Cell B2 has the value for demand, Cell C2 has the value for revenue, Cell D2 has the value for cost, and Cell E2 has the value for profit. In the worksheet, there is a table (or simply put, data) that generates the values for revenue, cost, and profit for any demand between the range 1 to 40. Thus, whenever I update the value in cell B2 to any integer between 1 and 40, the values in cells C2, D2, and E2 change accordingly.
What I want to do is, create a table with columns for demand, revenue, cost and profit. I manually entered the row data for demand, that consists of integers from 1 to 40. Now, I want to have data automatically entered into the rows of other 3 columns for all matching values of demand. For example, row 1 will have demand value 1, and the corresponding values for revenue, cost, and profit (as generated by cells C2, D2, and E2 when cell B2 is 1). Is there a function or VBA I can use to enter corresponding values automatically into all the rows (1-40)? Otherwise, I have to change B2 manually and enter the corresponding values for revenue, cost and profit all manually into the table, one by one. The reason why I need the table is to generate a line chart. Thus, if there is any other idea you've got, also appreciated.

For a simple solution that seems to work for you.
Use the current formulas you are using for the Revenue, Cost, and Profit within the table to calculate them. If you aren't familiar with Excel you can enter the formulas in the first row with respect to the Demand value and drag down from the bottom right hand corner of the cell to automatically copy the formula to the below cells.
Then for your B2, C2, D2, and E2 cells you could use VLookup to choose the correct values from the table based on the entry in cell B2.
If you linked an image of what you are trying to do I could give exact formulas but I believe this would work for your instance.

Related

Reference data from a range on one sheet to individual cells on another based on neighboring cell value (Excel 365)

Sheet 1 will be references to individuals based on unique identifiers, such that column A will be their name and column B will have the identifier.
Sheet 2 will be an imported list of all individuals in our data set, such that column A is their name and column B is the identifier.
The goal is to be able to fill cells in Sheet 1 Column A based off of values entered in Sheet 1 Column B, by referring to Sheet 2 Column B., i.e. if the column B values match between sheets, I want the neighboring value in Column A to be copied over.
I'm a novice at this, but I don't think CONCATENATE is what I'm looking for, so the closest I've gotten is:
=IF($B:$B=Sheet2!$B:$B,Sheet2!$A:$A)
which results in a SPILL error, because I think my formula is trying to display multiple reference cells of data in one destination cell, whereas a formula such as
=IF(B3=Sheet2!B3, Sheet2!A3)
returns expected results, but is too limited for my purposes, in that it would be potentially faster to just manually enter the data, at that rate.
Trying to simplify, I'll have a sheet that has say 100 people in it, with identifiers 1 through 100. If I punch in their identifier in a separate sheet, I'm looking for their name to be displayed in a neighboring cell, or at least to have their name returned in the same cell, i.e. I enter "90" in Sheet1A1 or Sheet1B1 and it gives me "John Doe" in A1, which is the value of Sheet2B90 that's associated with the number "90" that is in Sheet2A90.
So VLOOKUP does work with some wrangling, but XLOOKUP was the ultimate solution to what I needed. A formula such as
=XLOOKUP(A13,$A$1:$A$10,$B$1:$C$10,NONE)
Would return data from B1 through B10 and C1 through C10 to elsewhere in the sheet, in this case next to a lookup cell A13 into cells B13 and C13, if the value in A13 appears within the lookup array of A1 through A10. Locking the cells with $ allows the formula to be dragged down a range of lookup cells without Excel incrementing the values of the lookup or return arrays, just the value of the lookup cell.

how to find average with respective to the cell difference

so i have some data in column A, like this,
(A1)12 (B1)
(B2)1
(B3)2
(B4)3
(A5)15 (B5)4
(B6)1
(A7)32 (B7)2
but after each value in column, there are some random number of empty cell and then another value. so the formula i am using is to calculate data between A1 and A5 in column C is
=$A$1+(B2/4)*($A$7-$A$1)
same for the next two values in column A between A5 and A7. ,
but the thing is i have a very high amount of data, is there any option that i dont have to specify cell in the above formulae, it automatically selects the non empty cells in the formulae along with their cell numbers.and cell difference.![enter image description here]

EXCEL Distribute values in a column based on conditions

I need a formula to distribute values based on conditions.
In below (attached) image of excel sheet are two tables. Table-1 where i need data to be filled from Table-2. Formula should look in to table-2 and pick a value of 88587+HAWA+Jan and distribute in to Table-1 88587+HAWA+Jan column and so on till Dec...
Example:
In Table-2 formula pick 88587+HAWA+Jan (value is 71,405) than search in Table-1 for 88587+HAWA+Jan (in my case there are two matches to be filled with C3 and C6) now divide the value with count of matches 71,405/2= 35,703. Now formula put that 35,703 into C3 and C6.
Thanks in advance
Put this in C3 and copy over and down.
=SUMIFS(C$28:C$100000,$A$28:$A$100000,$A3,$B$28:$B$100000,$B3)/COUNTIFS($A$3:$A$24,$A3,$B$3:$B$24,$B3)

How to input min/max values and have Excel generate cells for each number in the range

I have 2 cells A2 and A3, I will input a min value and max value respectively in each cell. Say 100 in A2 and 200 in A3.
I would like Excel to populate cells with values within that range. So Column B would have cells 1-101 filled in with 100,101,103,104,105....200.
Is there any easy way to do this or should I just stick to putting 100 in B1 and dragging it down?
In you first cell:
=IF(ROW(1:1)-1+$A$2<=$A$3,ROW(1:1)-1+$A$2,"")
Then drag/copy the cells down far enough to cover any combination you will have. You can fill the whole column if you want.
Microsoft is working on their Dynamic Arrays, Once released, a simple formula in the first cell of:
=SEQUENCE(A3-A2+1,,A2)
Will autmatically fill down the sequence without the need of dragging the formula down.

How to write and run excel function in data validation ms-excel

I have an Excel sheet as below-
Cell No / Column A
-------------------
1. Total
2. $1,350.00
3. $2,670.00
4. $2,891.00
5. $1,107.00
6. Drop-Down List
I have added Data Validation List with some function name like MIN, MAX, SUM.I want to calculate the value of A2:A5 cell and display in A6 cell, if i select any of one function in A6 cell, which is added through data validations. Suppose I select SUM form in A6 cell, it will show sum of value function like SUM(A2:A5).
How can I do that?
You can simply create these three formulas in Column B, say, MIN in B1, MAX in B2, SUM in B3.
Then pull your data validation drop down list from these cells which already contain that formula.
However you need to format your B1, B2, B3 cells so that in data validation list you see for example MIN, MAX or SUM. I have done this for you in this dropbox link
like this:
here is the preview
You can hide column B so that nobody can make any changes to it. I have also selected the entire column range in column A in the formulas so if you add anything later to that column it automatically calculates them alL.
You can add as many formulas to column B as you want,and then put them in your data validation dropdown menu. Don't forget to format your cells in column B. You should custom format it and put your desired text inside "", like "MIN PRICE".

Resources