Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Copying data from cells A1,B1,C1 on tab1 to tab2

I want to copy data from cells A, B and C on Tab 1 of my workbook to other
tabs in my workbook dependant on which option is selected from a dropdown
list in cell D of Tab1

Example:
I have 'company name' in cell A, 'Account Number' in Cell B and 'Sales' in
cell C on tab 1, I then select 'Blue' from a dropdown list in cell D on tab
1. I then want excel to copy the data in cells A, B and C, on tab 1 into
another tab in the same workbook named 'Blue'.

can anybody help please????
--
Thanks,
Dan
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Copying data from cells A1,B1,C1 on tab1 to tab2

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.


Private Sub Worksheet_Change(ByVal Target As Range)
Dim lngLastRow As Long
Application.EnableEvents = False
If Target.Column = 4 And Target.Count = 1 Then
If Target.Text < "" Then
lngRow = Sheets(CStr(Target.Text)).Cells(Rows.Count, "A").End(xlUp).Row + 1
Me.Range("A" & Target.Row).Resize(, 3).Copy _
Sheets(CStr(Target.Text)).Range("A" & lngRow)
End If
End If
Application.EnableEvents = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"dannynic" wrote:

I want to copy data from cells A, B and C on Tab 1 of my workbook to other
tabs in my workbook dependant on which option is selected from a dropdown
list in cell D of Tab1

Example:
I have 'company name' in cell A, 'Account Number' in Cell B and 'Sales' in
cell C on tab 1, I then select 'Blue' from a dropdown list in cell D on tab
1. I then want excel to copy the data in cells A, B and C, on tab 1 into
another tab in the same workbook named 'Blue'.

can anybody help please????
--
Thanks,
Dan

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
copying data in cells Kimmie Excel Worksheet Functions 3 December 5th 08 03:48 PM
Copying data from 2 cells into 1 Taylor Excel Worksheet Functions 2 June 19th 08 06:43 PM
copying data to different Cells Auz Excel Worksheet Functions 1 April 28th 06 02:28 PM
Copying Data Between Cells Rags Links and Linking in Excel 2 September 8th 05 10:04 PM
Automatic copying of data cells DaleM Excel Discussion (Misc queries) 2 December 29th 04 07:07 PM


All times are GMT +1. The time now is 09:10 AM.

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"