Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
dvp dvp is offline
Junior Member
 
Posts: 2
Default Autofill data from one tab to another under certain criteria

I enter customer details onto an excel 2010 spreadsheet, ie customer name, date, description of order, amount of order etc. Sometimes, under certain criteria, the same or part of the same information needs to be added to another tab, ie tab2, on the same spreadsheet. I wanted to create an automated system to populate tab2, but cant figure out how.

I thought about creating another column in tab1, before all the customer information, which had a dropdown list option for yes/no when asked the question 'does it fit the criteria to add customer information to tab2'. This column would act as an alert, so that if i selected 'yes', then any customer information i enter in tab1 would then populate into tab2. But I dont know how to do this, can anyone help?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 621
Default Autofill data from one tab to another under certain criteria

Formulas or VBA?

Formulas................... in Sheet2 B2 enter

=IF(SHeet1!$A2="yes",Sheet1!B2,"") copy this across and down where
required

VBA would require event code to use the same logic to copy the info
without any formulas on Sheet2.

Post back if you want that................also provide more details on
"etc" and "some or part"


Gord

On Thu, 5 Jan 2012 12:57:01 +0000, dvp
wrote:


I enter customer details onto an excel 2010 spreadsheet, ie customer
name, date, description of order, amount of order etc. Sometimes, under
certain criteria, the same or part of the same information needs to be
added to another tab, ie tab2, on the same spreadsheet. I wanted to
create an automated system to populate tab2, but cant figure out how.

I thought about creating another column in tab1, before all the customer
information, which had a dropdown list option for yes/no when asked the
question 'does it fit the criteria to add customer information to tab2'.
This column would act as an alert, so that if i selected 'yes', then any
customer information i enter in tab1 would then populate into tab2. But
I dont know how to do this, can anyone help?

  #3   Report Post  
dvp dvp is offline
Junior Member
 
Posts: 2
Default

The formula works a treat, very simple, thanks. One more question, by autofilling yes/no, is there a way where all the information on that row could be copied as well if the result is yes?

If i give you an example, below is sheet 1:

Required Supplier Description Amount
Yes Lets get branded 5000 shopping bags 3549
No Media Pool 200 t-shirts 5000
No Lets get stranded 1000 folders 3549

So that all populated cells in row 2 would be copied over to the sheet 2 as 'Yes' was used. Is this possible?



On Thu, 5 Jan 2012 12:57:01 +0000, dvp
wrote:


I enter customer details onto an excel 2010 spreadsheet, ie customer
name, date, description of order, amount of order etc. Sometimes, under
certain criteria, the same or part of the same information needs to be
added to another tab, ie tab2, on the same spreadsheet. I wanted to
create an automated system to populate tab2, but cant figure out how.

I thought about creating another column in tab1, before all the customer
information, which had a dropdown list option for yes/no when asked the
question 'does it fit the criteria to add customer information to tab2'.
This column would act as an alert, so that if i selected 'yes', then any
customer information i enter in tab1 would then populate into tab2. But
I dont know how to do this, can anyone help?
[/quote]
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 621
Default Autofill data from one tab to another under certain criteria

Select Sheet1 where you have the data as per your description below.

Assumes you have yes/no DV dropdowns A1 down to A100

Copy titles from B1:D1 into A1:C1 on Sheet2

Select Sheet1..........right-click on sheettab and "View Code"

Copy/paste this code into that sheet module.

Option Compare Text 'makes text non-case sensitive
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:A100"
Dim srcerng, targrng As Range
n = Target.Row
Set srcerng = Range(Cells(n, "B"), Cells(n, "D"))
Set targrng = Sheets("Sheet2").Cells(Rows.Count, _
1).End(xlUp).Offset(1, 0)
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
On Error Goto endit
Application.EnableEvents = False
On Error Resume Next
If Target.Value = "yes" Then
srcerng.Copy Destination:=targrng
End If
End If
endit:
Application.EnableEvents = True
End Sub

Alt + q to return to Excel

Select "yes" in A2 and see B2:D2 go to Sheet2


Gord

On Wed, 11 Jan 2012 16:04:16 +0000, dvp
wrote:


The formula works a treat, very simple, thanks. One more question, by
autofilling yes/no, is there a way where all the information on that row
could be copied as well if the result is yes?

If i give you an example, below is sheet 1:

Required Supplier Description Amount
Yes Lets get branded 5000 shopping bags 3549
No Media Pool 200 t-shirts 5000
No Lets get stranded 1000 folders 3549

So that all populated cells in row 2 would be copied over to the sheet 2
as 'Yes' was used. Is this possible?



On Thu, 5 Jan 2012 12:57:01 +0000, dvp
wrote:
-

I enter customer details onto an excel 2010 spreadsheet, ie customer
name, date, description of order, amount of order etc. Sometimes,

under
certain criteria, the same or part of the same information needs to be
added to another tab, ie tab2, on the same spreadsheet. I wanted to
create an automated system to populate tab2, but cant figure out how.

I thought about creating another column in tab1, before all the

customer
information, which had a dropdown list option for yes/no when asked

the
question 'does it fit the criteria to add customer information to

tab2'.
This column would act as an alert, so that if i selected 'yes', then

any
customer information i enter in tab1 would then populate into tab2.

But
I dont know how to do this, can anyone help?-

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
Auto Copy/autofill Text from sheet to sheet if meets criteria Joyce Excel Discussion (Misc queries) 0 November 20th 08 11:05 PM
Autofill data in cell with other existing data. Steen Lautrup Excel Discussion (Misc queries) 1 June 3rd 08 12:25 PM
How to autofill a column if criteria is met for Excel 2003 Natalie Excel Worksheet Functions 2 July 11th 06 09:59 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
Macro that will autofill a column with data, up to the last row of data in previous c Max Velocity Excel Programming 4 November 27th 03 10:34 AM


All times are GMT +1. The time now is 06:14 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"