Range reference in excel - excel-formula

I'm in a little bit problem. Actually I am writing a formula in which I can't reference a cell like "B1" or "C9". I will generate a number which will be my column number and my row number is 3 to 9. Now I want a formula like vba cells(3,5):cells(9,5) in replacement of E5:E9. Is there any in excel without any vba?
Thanks guyz!

I don't believe it's ​possible without INDIRECT or OFFSET
This should work using INDIRECT:
=INDIRECT(ADDRESS(row_number1,column_number1)&":"&ADDRESS(row_number2,column_number2))

Related

Using count if and sum with the range defined on two cells in excel 2016

IMAGE OF THE FORMAT BEING USED:
Hello,
i have been trying to use the count if and the sum fucntion. The cell range of teh function should be taken from two other cells. is there any way to do that? i have been racking my brain for two days now. i have attached a picture for reference or an idea as to how it might happen.
thank you for your help
You can build a range using INDIRECT().
Indirect works as follows.
You build a range using text e.g.
INDIRECT("A"&A1). If A1 contains the number 8, indirect will reference cell A8.
If you want to reference a range you do it like this. INDIRECT("A"&A1":B"&A2). If A1 contains 8 and A2 contains 10 this indirect will make the reference of "A8:B10".

excel formula for SUM() where range is based on another cell?

I'm doing a sheet with this
=SUM(A2:A10)
And would like to have the range be dependent on the value in cell D5.
How can I do this? I looked into CHOOSE function, but that can only handle an array of 256 values. my actual range is several hundred thousand.
I tried this, but excel complained that this won't work:
=SUM(A(Sheet1!D5):A10)
To reiterate, in my formula, I want the 2 in A2 be dependent on the number I enter in cell D5
Use the INDIRECT() Function:
=SUM(INDIRECT("A" & Sheet1!D5 & ":A10"))
I'm posting my own answer because similar posts go into VBS, and other really complex things.
I solved this with INDIRECT:
=SUM(INDIRECT("A"&D5&":A10"))
Easy-peasy!

Indirect call of a column from different sheet

I know how to use the indirect formula in a sheet itself.
=INDIRECT(CHAR(ROW(A5))&ROW(A5))
However, I am having hard time manipulating this to find a formula from different sheet called 'sheet1'
I am trying to retrieve value in B3 of Sheet1 using indirect formula. Any help is appreciated.
Please note, going forward (I plan to drag this formula down) I plan to manipulate rows and columns so I do want both of them (rows and columns) as variable values.
Eg: NOT indirect('Sheet1'!B3) but rather something like indirect('Sheet1!'&char(row(a5))...etc) which is not working for me.
Thanks for the help!
=INDIRECT(CHAR(ROW(A5))&ROW(A5)) just returns #REF
do not use something like CHAR() to build a "A1" address. Better use R1C1:
=INDIRECT("'Sheet1'!R3C2",0)
to make the row dragable:
=INDIRECT("'Sheet1'!R"&ROW()&"C2",0)
or to fit the columns:
=INDIRECT("'Sheet1'!R3C"&COLUMN(),0)
or for both:
=INDIRECT("'Sheet1'!R"&ROW()&"C"&COLUMN(),0)

How to SUMPRODUCT cells that contain formulas

So, what I need is to show SUMPRODUCT of two cell ranges? Both of these cell ranges, that is, each cell contains formula in it. From this formulas I get some number in the cells. This is the way I'm doing it right now:
=SUMPRODUCT((S7:S1000)*(T7:T1000))
and because of formulas I get error A value used in the formula if of the wrong data type
How could I solve this problem? Is there some kind of way to read just number in the cell and not the formula?
Thanks
Replace the "*" with a comma (",").
I've had so much problems with this and in the end it was that instead of comma(",") I needed to use semicolon(";"). Maybe its up to Excel version, I'm using 2010?! So, solution was:
=SUMPRODUCT(S7:S1000;T7:T1000)

Need to replace AVERAGEIFS formula for excel 2003

I've been trying to get to grips with excel formulae for days, and now have a spreadsheet with 140 cells, each with a slightly different formula. Unfortunately, it now needs to be 'dumbed down' to Excel 2003.
I've tried to get my head round array formulae, and SUMPRODUCT, but I'm getting bogged down.
Fresh eyes, anyone?
This is the formula I need to convert from 2010 to 2003:
=AVERAGEIFS(Data!S:S,Data!L:L,"Atherstone",Data!T:T,"Service",Data!C:C,">="&K3,Data!C:C,"<="&K4)
K3 is a date range start, with K4 being the end, and Data! refers to Sheet 2 where all the data is held.
(I know all my cell ranges will have to be explicit - i.e. C2:c65536).
You will need to specify your range as a fixed area, as it will not understand S:S.
your formula will end up looking something like this:
=AVERAGE(IF(Data!L2:L2000="Atherstone",IF(Data!T2:T2000="Service",IF(Data!C2:C2000>=K3,IF(Data!C2:C2000<=K4,Data!S2:S2000)))))
(Untested)
you will also need to make it an Array formula, so excel can look at each of the values in the range individually by entering the formula using CTRL+SHIFT+Enter, instead of the more usual Enter after you have finished typing everything

Resources