# Replacing "offset" with "index"

#### eliasthebest

##### New Member
Hey guys!

Can anyone help me replace the "offset" with "index" in the following formula?

=IF(
AND(OFFSET(V12,0,-\$I38,1,1)-OFFSET(W12,0,-\$I38,1,1)=OFFSET(V12,0,-\$I38,1,1),OFFSET(V12,0,-\$I38,1,1)<>0),OFFSET(V30,0,-\$I38,1,1)+OFFSET(V31,0,-\$I38,1,1)-OFFSET(W31,0,-\$I38,1,1)+OFFSET(W32,0,-\$I38,1,1)-OFFSET(V32,0,-\$I38,1,1),
IF(OFFSET(V2,0,-\$I38,1,1)=1,OFFSET(V12,0,-\$I38,1,1)+OFFSET(V32,0,-\$I38,1,1)-OFFSET(G32,0,-\$I38,1,1)+OFFSET(G31,0,-\$I38,1,1)-OFFSET(V31,0,-\$I38,1,1),
IF(OFFSET(V12,0,-\$I38,1,1)=0,0,OFFSET(V12,0,-\$I38,1,1)+OFFSET(U31,0,-\$I38,1,1)-OFFSET(V31,0,-\$I38,1,1)+OFFSET(V32,0,-\$I38,1,1)-OFFSET(U32,0,-\$I38,1,1)+V39)))

Thanks!!

#### Jonmo1

##### MrExcel MVP
Welcome to the board.

I won't do all of them, but the method is the same for all (see how I do 1, you can do the rest)..

OFFSET(V12,0,-\$I38,1,1)
Can be changed to
INDEX(12:12,22-\$I38)

12:12 is the row reference from V12
22 is the column number of V

#### pgc01

##### MrExcel MVP
Hi

Also:

=INDEX(12:12,COLUMN(V:V)-I38)

in the case you want to drag it across

#### offthelip

##### Well-known Member
If i was doing this i would write some vba to do it. It might take as long as editing by hand but definitely more fun

#### eliasthebest

##### New Member
Jommo1 - thank you very much!! it worked!

You're welcome.

1,082,333
Messages
5,364,675
Members
400,810
Latest member
elbashka

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...