Solved

How can I retain information in a specific row in Excel?

Posted on 2016-11-17
12
18 Views
Last Modified: 2016-11-17
Good day.
Attached is a sample Excel file.
When I insert a Row, where Row2 is.. Row1 is still retaining the data from Row2.  
What I would like is, after I insert a Row at Row2, that Row1 will now show the data from the new Row that was inserted.
is this possible?SampleRows.xlsx
0
Comment
Question by:100questions
12 Comments
 
LVL 31

Accepted Solution

by:
Rob Henson earned 500 total points
ID: 41891777
A couple of options, OFFSET or INDIRECT function.

In B5 use this formula, and copy across:

=OFFSET(B5,1,0,1,1)

or

=INDIRECT(ADDRESS(ROW()+1,COLUMN(),1,1))
0
 
LVL 11

Expert Comment

by:Missus Miss_Sellaneus
ID: 41891780
You need to use dollar signs in your formulas in row 1, so they don't change when a referenced row moves. Put the dollar sign in front of what you want to stay the same, in this case the row numbers.

=B$6, =B$7, etc.
0
 
LVL 17

Expert Comment

by:Roy_Cox
ID: 41891781
I'm not exactly sure what you mean. If you select the cells in Row 2, right-click on the selection and choose insert you will get an option to move cels down, up etc. Is this what you mean?
0
 
LVL 31

Expert Comment

by:Rob Henson
ID: 41891783
@Miss_Sellaneus - using $ won't work. If an absolute formula refers to row 2 and a row is inserted, making row 2 now row 3 the formula will update to row 3. If the formula is copied elsewhere then the reference to row 2 will remain but not when the data feeding the formula moves.
0
 
LVL 11

Expert Comment

by:Missus Miss_Sellaneus
ID: 41891795
Rob: It worked for me on the author's spreadsheet. I inserted a row at row 2 and row 1 still referenced row 2 (which is the new inserted row) instead of updating to row 3. If I'm not mistaken, that's all the author needs. Are you talking about possible scenarios that don't currently exist in the spreadsheet? I think it's becoming way more complicated than necessary.
0
 
LVL 31

Expert Comment

by:Rob Henson
ID: 41891799
Yes, row 1 still references row 2. Author wants row 1 to reference new row inserted between row 1 and row 2.

What I would like is, after I insert a Row at Row2, that Row1 will now show the data from the new Row that was inserted.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 31

Expert Comment

by:Rob Henson
ID: 41891809
OFFSET and INDIRECT functions are fairly well described in the Online Help but if you have any queries, please ask.
0
 
LVL 11

Expert Comment

by:Missus Miss_Sellaneus
ID: 41891829
The inserted row becomes row 2. It still references row 2, therefore it references the new inserted row.
0
 
LVL 31

Expert Comment

by:Rob Henson
ID: 41891832
I think that maybe the use of Row1 and Row2 as headers is confusing the situation. In the sample change the wording to Header1, Header2 and Header3.

Header1 is on row 5 and is referring to cells alongside Header2 in row 6.

Insert a row at row 6 pushing Header2 down to row 7. I believe the author wants the formulas against Header1 (row 5) to stay looking at row 6, currently empty but no doubt will be populated with new data. Using absolute references does not achieve this; the formulas stay referencing the data alongside Header2 (row 7).
0
 
LVL 11

Expert Comment

by:Missus Miss_Sellaneus
ID: 41891848
Oh, okay, thanks! I didn't even pay attention to what was written in column A!
0
 
LVL 31

Expert Comment

by:Rob Henson
ID: 41891850
No worries. Hopefully the author will post again soon to confirm.
0
 

Author Closing Comment

by:100questions
ID: 41891955
Thank you.  Option 1 worked.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now