Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I´m looking for a formula that will transfer certain data to different sheets. For example: Data in sheet 1 If cell a1=usk data in cell a2,a3... Transfer data to sheet 2 If cell a1=ssk data in cell a2, a3... Transfer data to sheet 3 The easiest way would be to make another column but this will make the sheet to big to handle. Regards Stefan |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You need a macro. Where does the data go in sheets 2 and 3?
"Stefan" wrote: Hi, I´m looking for a formula that will transfer certain data to different sheets. For example: Data in sheet 1 If cell a1=usk data in cell a2,a3... Transfer data to sheet 2 If cell a1=ssk data in cell a2, a3... Transfer data to sheet 3 The easiest way would be to make another column but this will make the sheet to big to handle. Regards Stefan |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The data in sheet 2 and 3 is an average of the data printed in sheet 1.
For example: The average of a2-a5 in sheet 1 goes to a2 in sheet 2 if a1 in sheet 1 equal ssk You need a macro. Where does the data go in sheets 2 and 3? "Stefan" wrote: Hi, I´m looking for a formula that will transfer certain data to different sheets. For example: Data in sheet 1 If cell a1=usk data in cell a2,a3... Transfer data to sheet 2 If cell a1=ssk data in cell a2, a3... Transfer data to sheet 3 The easiest way would be to make another column but this will make the sheet to big to handle. Regards Stefan |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I don't think your request is correct. I asume in sheet 1 the Type is in
column A and the values you want averaged is in column B to E. The averages wil go in column A in the sheet specified. Sub MoveData() With Sheets("Sheet1") RowCount = 1 Do While .Range("A" & RowCount) < "" Select Case DataType Case "USK" Set Sht = Sheets("Sheet2") Case "SSK" Set Sht = Sheets("Sheet3") End Select LastRow = Sht.Range("A" & Rows.Count).End(xlUp).Row Newrow = LastRow + 1 Set DataRange = .Range("B" & RowCount & ":E" & RowCount) Average = WorksheetFunction.Average(DataRange) Sht.Range("A" & Newrow) = Average RowCount = RowCount + 1 Loop End With End Sub "Stefan" wrote: The data in sheet 2 and 3 is an average of the data printed in sheet 1. For example: The average of a2-a5 in sheet 1 goes to a2 in sheet 2 if a1 in sheet 1 equal ssk You need a macro. Where does the data go in sheets 2 and 3? "Stefan" wrote: Hi, I´m looking for a formula that will transfer certain data to different sheets. For example: Data in sheet 1 If cell a1=usk data in cell a2,a3... Transfer data to sheet 2 If cell a1=ssk data in cell a2, a3... Transfer data to sheet 3 The easiest way would be to make another column but this will make the sheet to big to handle. Regards Stefan |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Joel, this will do it
"joel" wrote: I don't think your request is correct. I asume in sheet 1 the Type is in column A and the values you want averaged is in column B to E. The averages wil go in column A in the sheet specified. Sub MoveData() With Sheets("Sheet1") RowCount = 1 Do While .Range("A" & RowCount) < "" Select Case DataType Case "USK" Set Sht = Sheets("Sheet2") Case "SSK" Set Sht = Sheets("Sheet3") End Select LastRow = Sht.Range("A" & Rows.Count).End(xlUp).Row Newrow = LastRow + 1 Set DataRange = .Range("B" & RowCount & ":E" & RowCount) Average = WorksheetFunction.Average(DataRange) Sht.Range("A" & Newrow) = Average RowCount = RowCount + 1 Loop End With End Sub "Stefan" wrote: The data in sheet 2 and 3 is an average of the data printed in sheet 1. For example: The average of a2-a5 in sheet 1 goes to a2 in sheet 2 if a1 in sheet 1 equal ssk You need a macro. Where does the data go in sheets 2 and 3? "Stefan" wrote: Hi, I´m looking for a formula that will transfer certain data to different sheets. For example: Data in sheet 1 If cell a1=usk data in cell a2,a3... Transfer data to sheet 2 If cell a1=ssk data in cell a2, a3... Transfer data to sheet 3 The easiest way would be to make another column but this will make the sheet to big to handle. Regards Stefan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
calculate totals from added sheets | Excel Discussion (Misc queries) | |||
Use excel to calculate a percentile from data in multiple sheets | Excel Worksheet Functions | |||
How to calculate percentage acroos sheets in a workbook | Excel Discussion (Misc queries) | |||
new sheets by this pc cannot calculate formulas | Excel Discussion (Misc queries) | |||
calculate totals of 5 sheets on to 6th sheet. | Excel Worksheet Functions |