English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm working on a excel program that will allow my Construction business to electronically database our bid system. My idea is to have a main page in excel that will have columns labeled Date, Due Date, and Job Name. Every time a job is going to be bid we add it to this sheet.

From here I need to have the JOB NAME entered manually to be automatically copied(by code or if/than) to another sheet Alphabetically(Other sheets will be A,B,C,D,E,F,G all the way to Z.

Therefore if I enter Trump tower on the Main page it will copy it over to the "T" page automatically.

If I enter Airport on the Main page it will copy it over to the "A" page automatically

If there is a way to do this let me know.

2007-11-28 14:38:14 · 3 answers · asked by tfoster1107 2 in Computers & Internet Programming & Design

3 answers

Only for copying, u can use a marco. Record a marco then run it whenever u want. (use the Help of excel to find out about Marco and record Marco.) Do this:

1. click on Record Marco
2.manually copy the specific cell's content from ur main page to all pages
3. stop the marco

whenever u run this marco, the same process will be done automatically.

But for more advanced actions, u must know VBA (excell programming). google for like "vba copy paste"

2007-11-28 15:21:50 · answer #1 · answered by ___ 4 · 0 0

You can't just use the macro recorder. For that you are going to have to write VBA macro code. You'll need a check system that probably uses the "Like" operator to determine what letter it starts with then tell it what page it sends the data to. For the example below you'd have to write code to set the variable MyString equal to your data you want evaluated. Then you would use the Like operator like in the example to determine what letter it starts with. The two lines I entered would check MyString to see if it starts with an A or a B. You would need to check for the rest of the letters in the alphabet. Then give it commands on where to send the data based on what the first letter is.


Dim MyCheckA As Boolean, MyCheckB As Boolean
Dim MyString As String

MyCheckA = MyString Like "A*"
MyCheckB = MyString Like "B*"

2007-11-29 11:07:28 · answer #2 · answered by devilishblueyes 7 · 0 0

what you need to do is create a macro with a series of advanced filter commands:

Range("Database"). AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:= Range ("CriteriaA"), _
CopyToRange:= Range ("SheetA")

you'll need have that command repeated for every criteria/letter and also set up a series of criteria labels cells such as:

Job Name
"=A*" (enter formula as ="=A*")

Job Name
"=B*"

Although it says in the help file that you need to type the criteria above the cells being filtered, in my experience the criteria can actually be on any sheet (well, at least in a macros I've created)

2007-11-29 00:28:29 · answer #3 · answered by Blackened 6 · 0 0

fedest.com, questions and answers