EXCEL how to set cell row from other cell value - excel

Is there a way for me to set a row value from another cell value.
Example:
A1 = B62 = 'HELLO'
C1 = 62
So instead of 62 I want to set the value of C1.
A1 = B(C1) which would equal B62.
I hope I explained it well :P
Update:
This is the formula bar: =SUMIF('I1'!$C$2:$C$61,A2,'I1'!$F$2:$F$61)
Want to change the both 61 to my V4 cell value. For example if V4 = 10.
That would make =SUMIF('I1'!$C$2:$C$10,A2,'I1'!$F$2:$F$10)

Use the non volatile INDEX()
=SUMIF('I1'!C$2:INDEX('I1'!$C:$C,$V$4),A2,'I1'!F$2:INDEX('I1'!$F:$F,$V$4))

You'll want to use Indirect.
In C1, place your row value (15, for example). Then, in cell A1, use =Indirect("B" & $C$1)
Then as you change the value in C1, the value in A1 will change.

Related

Making Excel list more clearer to see the difference between the cells

In my list in Excel I have in Column A following data:
Cell A1 = GG-10000
Cell A2 = GG-10000
Cell A3 = GG-10005
Cell A5 = GG-10047
cell A6 = GG-10047
Cell A7 = GG-10047
Cell A8 = GG-10050
Cell A9 = GG-10050
Cell A10 = GG-10100
and so one...
Can someone tell me how to bold the lines as below
cell A1 = GG-10000 (this need to be in bold)
Cell A2 = GG-10000 (this need to be in bold)
Cell A3 = GG-10005
Cell A5 = GG-10047(this need to be in bold)
Cell A6 = GG-10047(this need to be in bold)
Cell A7 = GG-10047(this need to be in bold)
Cell A8 = GG-10050
Cell A9 = GG-10050
Cell A10 = GG-10100(this need to be in bold)
So the idea is that I can see the difference between the different numbers.
Many thanks
Robin
You can use conditional formatting.
If you have Office 365 Excel you can use this formula:
=ISODD(MATCH(A1,UNIQUE(FILTER(A:A,A:A<>"")),0))
UNIQUE => a list of the unique entries
MATCH => position of each individual entry in the unique list
ISODD => returns alternating boolean when the entry changes
If you don't have these Excel O365 functions, I'd suggest you develop a VBA routine or use a helper column to do something similar.
Here's an example of a "helper column"
I'll use column B, but you can use any column anywhere; and you can hide it.
B1: 1
B2: =IF(A2=A1,B1,-B1) and fill down
Conditional Format formula:
=B1=1
Since the CF Applies to range is unchanged, that will still be the range that gets formatted.
If you are okay with a helper column then in cell B1 put 1.
and in cell B2:
=IF(A2=A1,B1,B1+1)
which you shall copy down. Afterwards, for A1:A9 range apply conditional formatting like below:
The outcome if implemented correctly will look like below.

Excel Named cell as a column inside of a formula?

I have a value in A1 that is a named cell. I want to use that value to perform an equation on a column. Something like: sum(ColumnTest:ColumnTest)
So If A1 = "C" and its a Named cell "ColumnTest"
so If I typed the following into B1 I would get "6". =Sum(ColumnTest:ColumnTest)
C1 = 1
C2 = 2
C3 = 3
Any suggestions on how to do this?
You can use the INDIRECT function:
=SUM(INDIRECT(ColumnTest&":"&ColumnTest))
or simply:
=SUM(INDIRECT(A1&":"&A1))
if the cell wasn't named.

Google sheets: Case statement or ifelse formula to modify a cell's value based on the value of another cell?

Based on a validation, if A1 = 20, then B1 = 5.
Based on a formula, B2 = B1.
Except, I want B2 = B1 + D1, if C1 = True.
My question is: How do I make it so that the formula for one cell (B2) equals the sum of two cells (B1,D1) in the event that a third cell (C1) has a True value? If it is False, I want it (B2) to just equal the sum of one cell (B1).
So in B2:
=B1+IF(C1="True",D1,0)
If C1 is TRUE then it can be shortened to:
=B1+IF(C1,D1,0)
=if(C1=true,sum(B1,D1),sum(B1))

Set range in formula via a cell

Is there a way to set the range of a formula by reference to another cell's content? I need the formula to be dynamic based on what I key. For example, I need the formula: Sum(A1:B10), is there a way to do this:
=Sum("RefrenceCellC1" : "RefrenceCellC2")
(where C1 = A1 and C2 = B10), so if I change cell C2 content to B20 the formula then becomes: Sum(A1:B20)?
For the sake of an answer (as alluded to by #tigeravatar):
=SUM(INDIRECT(C1&":"&C2))

Excel sum with relative positions

How do I sum from whats in B2 to C2 ?
B2 = A10 or just 10 (preferred)
C2 = A25 or just 25 (preferred)
Normally you would just use SUM(A10:A25), but the values in B2 and C2 are not fixed, they change based on input.
I can use MATCH to find the numbers, but how do I tell SUM to use those numbers ?
The values to sum are always in the same column.
You can use the INDIRECT function for this, e.g.
=SUM(INDIRECT(B2):INDIRECT(C2))
if you can live with entering the entire cell name (A10, A25).
Or to just have the numbers in B2 and C2, you could use
=SUM(INDIRECT(ADDRESS(B2;1)):INDIRECT(ADDRESS(C2;1)))
(Hope I got the columns and rows in the right order!)
You want to specify Cell Co-ordinates in the value of a Cell ?
Is that what you're getting at ?
Try Setting
B1 = "A10"
C1 = "A25"
D1 = =SUM(INDIRECT(B1):INDIRECT(C1))
Use the INDIRECT() function. You pass it a string that is a range, which allows you to have a dynamic range based on input.

Resources