Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default adding cell data to a record

Hi all, I have a sheet set up for some quick input on a few cells and
calculations are made in several other cells to estimate customers jobs. I
would like to set up a way to add data that was calculated on that sheet,
named "estimate" (cells L5:L11, L17:L19, L21:L26) to a new record in a sheet
called "data" in the same workbook. But only if I select to do so (the
estimate accepted or declined by the customer) Thanks, Mike
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default adding cell data to a record

You can assign this macro to a button and run when you want...
Sub CopyRow()

'----------------
Dim i, j As Integer
Dim LastRow As Long

With Worksheets("Data")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1

End With
MsgBox LastRow

j = 1
For i = 5 To 11
Sheets("Data").Cells(LastRow, j).Value = Sheets("Estimate").Cells(i, 12).Value

j = j + 1
Next

For i = 17 To 19
Sheets("Data").Cells(LastRow, j).Value = Sheets("Estimate").Cells(i, 12).Value
j = j + 1
Next

For i = 21 To 26
Sheets("Data").Cells(LastRow, j).Value = Sheets("Estimate").Cells(i, 12).Value
j = j + 1
Next

End Sub

"MikeH" wrote:

Hi all, I have a sheet set up for some quick input on a few cells and
calculations are made in several other cells to estimate customers jobs. I
would like to set up a way to add data that was calculated on that sheet,
named "estimate" (cells L5:L11, L17:L19, L21:L26) to a new record in a sheet
called "data" in the same workbook. But only if I select to do so (the
estimate accepted or declined by the customer) Thanks, Mike

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default adding cell data to a record

Thank you very much sheeloo, its very very appreciated, Mike

"Sheeloo" wrote:

You can assign this macro to a button and run when you want...
Sub CopyRow()

'----------------
Dim i, j As Integer
Dim LastRow As Long

With Worksheets("Data")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1

End With
MsgBox LastRow

j = 1
For i = 5 To 11
Sheets("Data").Cells(LastRow, j).Value = Sheets("Estimate").Cells(i, 12).Value

j = j + 1
Next

For i = 17 To 19
Sheets("Data").Cells(LastRow, j).Value = Sheets("Estimate").Cells(i, 12).Value
j = j + 1
Next

For i = 21 To 26
Sheets("Data").Cells(LastRow, j).Value = Sheets("Estimate").Cells(i, 12).Value
j = j + 1
Next

End Sub

"MikeH" wrote:

Hi all, I have a sheet set up for some quick input on a few cells and
calculations are made in several other cells to estimate customers jobs. I
would like to set up a way to add data that was calculated on that sheet,
named "estimate" (cells L5:L11, L17:L19, L21:L26) to a new record in a sheet
called "data" in the same workbook. But only if I select to do so (the
estimate accepted or declined by the customer) Thanks, Mike

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a blank row after a new record changes in excel Skyblue Excel Worksheet Functions 1 August 8th 08 04:24 AM
adding data to existing data cell Curious Excel Worksheet Functions 2 January 19th 07 08:21 PM
Record changing cell data into a column or range Emmie Excel Worksheet Functions 2 December 21st 06 12:23 AM
adding data containing name X on the cell Louie Excel Worksheet Functions 2 December 7th 06 01:48 AM
how do i record changing cell data (cell is dde linked) Morph Excel Discussion (Misc queries) 1 September 22nd 05 12:28 AM


All times are GMT +1. The time now is 02:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"