Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
voyager via OfficeKB.com
 
Posts: n/a
Default I am looking for help on a formula

Ok, I usually can get around problems with formulas, but this one is
beating ym brain to a pulp.

Anyone knows how to make the following happen?

Using sheet1, I want to transfer the entire line of text to another sheet,
using my customer names. That way, I can keep track of who ordered what
and when, and how much was paid for it, instead of jumbling it on one
sheet. The process would have me creat about 15 different sheet to track
my customer's activities.

Than you
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Keep it on one sheet, and use data filters to show just the customer that
you are interested in. Much better technique, less prone to errors.

If you must have separate sheets, try the macro below.

HTH,
Bernie
MS Excel MVP

Sub ExportDatabaseToSeparateSheets()
'Export is based on the value in the desired column
Dim myCell As Range
Dim mySht As Worksheet
Dim myName As String
Dim myArea As Range
Dim myShtName As String
Dim KeyCol As Integer

myShtName = ActiveSheet.Name
KeyCol = InputBox("What column # within database to use as key?")

Set myArea = ActiveCell.CurrentRegion.Columns(KeyCol).Offset(1, 0).Cells

Set myArea = myArea.Resize(myArea.Rows.Count - 1, 1)

For Each myCell In myArea
On Error GoTo NoSheet
myName = Worksheets(myCell.Value).Name
GoTo SheetExists:
NoSheet:
Set mySht = Worksheets.Add(befo=Worksheets(1))
mySht.Name = myCell.Value
With myCell.CurrentRegion
.AutoFilter Field:=KeyCol, Criteria1:=myCell.Value
.SpecialCells(xlCellTypeVisible).Copy _
mySht.Range("A1")
mySht.Cells.EntireColumn.AutoFit
.AutoFilter
End With
Resume
SheetExists:
Next myCell

End Sub


"voyager via OfficeKB.com" wrote in message
...
Ok, I usually can get around problems with formulas, but this one is
beating ym brain to a pulp.

Anyone knows how to make the following happen?

Using sheet1, I want to transfer the entire line of text to another sheet,
using my customer names. That way, I can keep track of who ordered what
and when, and how much was paid for it, instead of jumbling it on one
sheet. The process would have me creat about 15 different sheet to track
my customer's activities.

Than you



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
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
Simplify formula Luke Excel Worksheet Functions 37 May 6th 05 07:21 AM
put formula results into a different cell if it is empty PutFormula Excel Worksheet Functions 2 February 11th 05 03:31 AM
how do i write a formula and keep in in formula form, so it DOESN. norcalchick2207 Excel Discussion (Misc queries) 2 February 4th 05 08:38 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


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