Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

inserting line and keeping formulas


  • Please log in to reply

#1
bemiddy

bemiddy

    New Member

  • Member
  • Pip
  • 5 posts
hey all
Id like to insert a line into excel and i would like it to auto fill somehow with the proper formula. like the cells around

is that possible to insert a line with it being already formatted?
thanks
  • 0

Advertisements


#2
Octagonal

Octagonal

    Member 2k

  • Member
  • PipPipPipPipPip
  • 2,528 posts
It depends on exactly what you are after. There are several ways to do this. It is possible to simply insert the row and then copy and paste (formula) from a previous row or you can achieve this by writing VBA code to do the whole thing automatically. You have to consider things like cell reference (relative or absolute) etc.

HTH
"O"
  • 0

#3
bemiddy

bemiddy

    New Member

  • Topic Starter
  • Member
  • Pip
  • 5 posts

It depends on exactly what you are after. you can achieve this by writing VBA code to do the whole thing automatically. You have to consider things like cell reference (relative or absolute) etc.



how would I do it with vba code?
  • 0

#4
Octagonal

Octagonal

    Member 2k

  • Member
  • PipPipPipPipPip
  • 2,528 posts
Are you familiar with VBA coding? If you aren't, writing code for what you are asking in your first post can be a little tricky.

Below is an sample of code to insert a row.

Sub InsertRow()
Dim NumOfRows
NumOfRows = InputBox("Enter the number of rows required to be inserted.")
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(NumOfRows - 1, 0)).Select
Selection.EntireRow.Insert
End Sub

Here is a good example of the code for inserting rows and formulas.

I wont go into coding any further here as that topic belongs in the Programming sub- forum.

HTH
"O"
  • 0

#5
bemiddy

bemiddy

    New Member

  • Topic Starter
  • Member
  • Pip
  • 5 posts
thanks
that site really helped!!
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP