Over 1 million tech questions and answers.

Solved: excel macro help please

Q: Solved: excel macro help please

hi... i am really having a problem with creating a macro, could you please help me.

i have to copy content from a auction website, paste it into excel.
this is what the content looks like

Auction - 125458
view bigger image --- name of item
ref number --- start date
end date --- price of item
page views
users tracking
no bids
relists remaining (this is sometimes left out and causes my stress)
copy or relist
edit
close
delete
the above content over 3 columns and over different rows.
i managed a simple macro to put these into column’s, but the problem being that sometimes there is not the same amount of rows with the relists remaining left out sometimes....
so what i need is a macro to put the data above into column’s,
eg... word starting with auction = c1
word starting with view bigger = d1
word starting with item name = e1
---------- then when the next word starting with auction = c2

could you pretty please help me with this

RELEVANCY SCORE 200
Preferred Solution: Solved: excel macro help please

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Solved: excel macro help please

Read other 9 answers
RELEVANCY SCORE 62.4

I am trying to create a code that will autofilter data on an Excel worksheet. The code works fine to filter the data, but it does not hide the AutoFilter Arrows.

Below is the code I am using. What (if anything) is wrong with the code below?
Code:

ActiveSheet.Range("A1:D500").AutoFilter Field:=2, Criteria1:="<>", Visibledropdown:=False
 

A:Solved: Excel 2007 Macro -> Hide Excel AutoFilter Arrows

I noticed that the code above (in Post #1) that the AutoFilter Arrows were beinf truned off on Field 2, but none of the others.

I have played around, and done some research to come up with the code below:
Code:

Dim c As Range

For Each c In ActiveSheet.Range("A1:D1")
ActiveSheet.Range("A1:D500").AutoFilter Field:=2, Criteria1:="<>"
c.AutoFilter Field:=c.Column, Visibledropdown:=False
Next

Does anyone have a better solution?
 

Read other 1 answers
RELEVANCY SCORE 62.4

Hello again,

I have a word doc that has a form in it. The form may have any number of fields (boxes) to type text answers into, or be a drop down list to select an answer from. I need an excel macro that extracts all data from the form, but with every five fields starting a new row in excel. So all data from the form will appear within 5 columns in an excel spreadsheet.

field 1 field 2 field 3 field 4 field 5
field 6 field 7 field 8 field 9 field 10
etc

Is that possible? I have had no luck to do it myself.

Sample form attached, thank you
____________________________
 

A:Solved: Excel macro to extract Word form data into Excel

Read other 7 answers
RELEVANCY SCORE 62.4

I’m using Windows 7 and I used a macro which worked totally fine under Excel 2003. Now, under Excel 2007 it does not run anymore but displays the following error message:

"Run-time error '445':
Object doesn't support this action.

The function of the macro is to open up all other Excel spreadsheets located in the same folder and copy data out of them into the spreadsheet in which the macro is stored.

When I click on "Debug" the Visual Basic Editor highlights the row which says: Set FilSrch = Application.FileSearch

Can you help me with this? I've searched for a solution for a long time but could not find anything which worked.

The following is the start of the macro code:

Sub UpdateTable()
Dim X As Range, I As Integer, J As Integer, RecNo As Integer, CopyVal As Variant
Dim SourceBk As Worksheet, DestBk As Worksheet, StartRow As Integer, IndRange As Range
Dim ServRange As Range, SrcOpen As Boolean, SourceName As String
Dim FilSrch As Object, MyFilArray() As String

'MsgBox "This function not available in this version.", vbInformation, "Function Not Available"
'Exit Sub
'Sheets("LookUp").[a12] = Now
With Application
.ScreenUpdating = False
.StatusBar = "Counting source files ..."
End With
Set FilSrch = Application.FileSearch
With FilSrch
.NewSearch
.LookIn = ActiveWorkbook.Path
.FileType = msoFileTypeExcelWorkbooks
If .Execute > 0 Then
ReDim MyFilArray(.FoundFiles.Count)
For I = 1 ... Read more

A:Solved: Excel 2003 Macro Doesn't Run in Excel 2007 - Help Requested

Read other 7 answers
RELEVANCY SCORE 61.6

Hi guys,

I have been on the lookout for a macro that will compare 2 worksheets within MS Excel and output the differences on a third sheet.

I am being directed to the URL below but cannot for the life of me work out how to implement this:

http://exceltip.com/st/Compare_two_worksheets_using_VBA_in_Microsoft_Excel/477.html

There are two snippets of code which I will include here for convenience but not sure whether these should be pasted into Workbook Code (i.e. right-clicking Excel icon left of "File" - top-left), Worksheet Code (i.e. right-clicking worksheet tab) or inserting a new Module - or some other method. Is there anyone here that could guide me to how to implement this code?

Quote from webpage - "With the macro below it is possible to compare the content of two worksheets.
The result is displayed in a new workbook listing all cell differences. "

Code:
Sub CompareWorksheets(ws1 As Worksheet, ws2 As Worksheet)
Dim r As Long, c As Integer
Dim lr1 As Long, lr2 As Long, lc1 As Integer, lc2 As Integer
Dim maxR As Long, maxC As Integer, cf1 As String, cf2 As String
Dim rptWB As Workbook, DiffCount As Long
Application.ScreenUpdating = False
Application.StatusBar = "Creating the report..."
Set rptWB = Workbooks.Add
Application.DisplayAlerts = False
While Worksheets.Count > 1
Worksheets(2).Delete
Wend
Application.DisplayAlerts = True
With ws1.UsedRange
lr1 = .Rows.Count
lc1 = .Column... Read more

A:Solved: How to use this Macro in MS Excel (compare excel worksheets)

Apologies... I have sorted this... For those that might be looking at this for help here's what I missed:

These are both Sub's that should be created as a Module - both in the same module. I am just comparing worksheets within the Active Worksheet so just removed:

' compare two different worksheets in two different workbooks
CompareWorksheets ActiveWorkbook.Worksheets("Sheet1"), _
Workbooks("WorkBookName.xls").Worksheets("Sheet2")
Click to expand...

I was then able to run this from Macro's. All sorted.

Apologies again
 

Read other 1 answers
RELEVANCY SCORE 57.6

Ok not sure if this can be done or not, but hopefully it can.
What I want to create is a macro or something that would read the values in column A, if it finds a duplicate number it would insert a row under it

i.e.

5
5
6
7
8
It would insert a row between the 5 and 6.
Is this possible?
 

A:Solved: Excel Macro - Not sure if it can be done

Read other 16 answers
RELEVANCY SCORE 57.6

I need to write a macro to look down all the cells of an entire column of one worksheet and whenever the value of a cell is greater than zero, copy that value and paste to the next empty cell along a different column. For instance, I'm looking down the entire column and D5 is greater than 0, so I paste it to N1,. Next, D8 is greater than 0, so i need to be able to paste this to N2 and so on. Can someone help? Thanks
 

A:Solved: Excel Macro

Hi,

Copy and paste the code to a "Module"
Code:

Sub Check_Zero()
Application.ScreenUpdating = False
Dim cel As Range
Dim lcel As Long
For Each cel In Range("D2:D" & Range("D65536").End(xlUp).Row)
If Cells(cel.Row, 4).Value > "0" Then
lcel = Range("N65536").End(xlUp).Row + 1
Cells(lcel, 14).Value = Cells(cel.Row, 4).Text
End If
Next
End Sub
 

Read other 3 answers
RELEVANCY SCORE 57.6

Hello, I need some help with a macro. I am writing an If...Then...Else statement. The If is based on whether the current cell is blank. This seems simple enough from my experience with Lotus 1-2-3 macros but I can't make it happen. Here is where I am -

If ActiveCell.Value.Isnull = True Then
Blah...Blah...Blah
Else.... Help me! Thanks
 

A:Solved: Excel Macro (VB)

Welcome to the board.

If ActiveCell = "" Then
Do this
Else
Do that
End If

It's the same as IF formula, only in code.

Rgds,
Andy
 

Read other 2 answers
RELEVANCY SCORE 57.6

i have created a spreadsheet that has a list of names down the left, days of the week and dates across the top and a "user' choose in the data fields.The spreadsheets are in one workbook and i have a sheet for each month.

What i need to do is create a form that will enable users to choose a "Date" period ie start and end dates and choose a "name". i then need this form to have a button on it that when clicked would generate an email to the relative person named which would have all of the relevant data in it.

I know how to create the actual form, it's linking everything to it thats the problem, so would really appreciate some help.

Hope this all makes sense !!!
 

A:Solved: Excel macro help req

Read other 15 answers
RELEVANCY SCORE 57.6

I am running Excel 2003. I am creating a macro that open files from a external hard drive. I was hoping to find a way for the macro to find the Drive letter of the external hard drive instead of me having to statically assign the drive letter.

Any help with this would be great.
 

A:Solved: Excel Macro

Read other 9 answers
RELEVANCY SCORE 57.6

I am have a form in excel that when a certain person types his name at the end the following cell will put in date that he signed it. The problem is that when you e-mail the doc. the following day (or whatever day) the date changes to the current date and not the actual date that the doc was signed. (by signed i mean the person typing his name there) Here is the code that is currrently in the doc.
=+IF(F36="Persons Name",H43," ")

I'm not sure if there is some kind of formula for this or do i have to write a macro for it. If i do have to write a macro for it, could someone please help me out with it.
 

A:Solved: Excel Macro

Read other 6 answers
RELEVANCY SCORE 57.6

Hi,

I have following data with me and this data extends till 1000 rows.

IDSYSTEMASSOCIATED_ABC_PROCESSASSOCIATED_XYZ_PROCESS9ABC Stage IIIABC.101-1XYZ.103-459ABC Stage IIABC.101-2XYZ.103-459ABC Stage IABC.101-3XYZ.103-459XYZ Stage IABC.101-4XYZ.103-459ABC Stage IABC.102-2XYZ.103-469ABC Stage IABC.103-2XYZ.103-479XYZ Stage IABC.103-4XYZ.103-4810ABC Stage IABC.104-1XYZ.105-4-310ABC Stage IIIABC.104-2XYZ.105-4-410ABC Stage IIIABC.104-6XYZ.105-4-510XYZ Stage IIABC.105-1-1XYZ.105-4-610ABC Stage IVABC.106-1XYZ.107-3

I am looking for a macro which will give me results as mentioned below.

IDABC / XYZ METRICABC XYZ STAGES9ABC.101-1
ABC.101-2
ABC.101-3
ABC.101-4
ABC.102-2
ABC.103-2
ABC.103-4
XYZ.103-45
XYZ.103-45
XYZ.103-45
XYZ.103-45
XYZ.103-46
XYZ.103-47
XYZ.103-48
ABC Stage I
ABC Stage II
ABC Stage III
ZYZ Stage I
10ABC Stage I
ABC Stage III
XYZ Stage II
ABC Stage IVABC.104-1
ABC.104-2
ABC.104-6
ABC.105-1-1
ABC.106-1
XYZ.105-4-3
XYZ.105-4-4
XYZ.105-4-5
XYZ.105-4-6
XYZ.107-3



In Column 'ABC / XYZ METRIC' the values from coulmns 'ASSOCIATED_ABC_PROCESS' and 'ASSOCIATED_XYZ_PROCESS' are combined for the respective ID.

Thanks in advance,

Regards,
Akki
 

A:Solved: Excel Macro Help

I don't know how the table are disorganized after submmiting the querry. Submmiting new query with attachment.

Regards,
Akki
 

Read other 1 answers
RELEVANCY SCORE 57.6

hi all i've never written a macro before and have been searching online for how to do it but am still pretty confused. i have 4 columns of data, the first of which has a number 1-8 or is blank. if its blank, i want my macro to fill in a number 1-8 based off the next 3 columns. below is how i've thought about how i want my macro to look, but i don't know how to translate this (b, c, d, and e are the columns). any help would be MUCH appreciated. thanks,
If b = "" Then
{If c > 0 Then

(If d > 0 Then

If e > 0 Then b = "1"

If e < 0 Then b = "5")

(If d < 0 Then

If e > 0 Then b = "2"

If e < 0 Then b = "6")}
{If c < 0 Then

(If d > 0 Then

If e > 0 Then b = "3"

If e < 0 Then b = "7")

(If d < 0 Then

If e > 0 Then b = "4"

If e < 0 Then b = "8")}
Else: b = b
 

A:Solved: excel macro help please

Read other 6 answers
RELEVANCY SCORE 57.6

I have an excel report (tab name is "sample report")that lists many rows of data (each row is a new case). In column "H" it lists who is working on each case. Column "I" lists dates. If a date is shown then that means the case is closed. If the cell is empty that means the case is still open.

What I need is a macro that will copy all of the "Open" cases from the "Sample Report" tab and put them into the other tab "Open Case Log" under the specific names in column "H". I have put 5-10 blank rows under each name on the "Open Case Log" tab but I am never sure excalty how many open cases each person will have at any given time. This is where I am having the problem. I have attached the sample excel report.

Any and All help would be greatly appreciated.

Thank you.
 

A:Solved: Need Help with Excel Macro

Read other 16 answers
RELEVANCY SCORE 57.6

Hi Friends,

I'm very much new to Macro in excel. I wanted to Run Macro in the following situation :
I have 2 Excel Book having same header but some data which to be consolidated in a 3rd Book. I recorded macro in 3rd Book the macro function is to " to open Book 1 & Book 2 & consolidate in Book 3" on running the recorded macro.

But after saving the macro and running tha macro again with some new data in Book 1 & Book 2 it gives the following error message "Run-time error '9':
Script out of range

and on debug the following macros are displayed.
---------------------------------------------
Sub Macro2()
'
' Macro2 Macro
'
' Keyboard Shortcut: Ctrl+l
'
Workbooks.Open Filename:= _
"C:\Documents and Settings\Administrator\Desktop\Book2.xlsx"
Workbooks.Open Filename:= _
"C:\Documents and Settings\Administrator\Desktop\Book1.xlsx"
Windows("Report.xlsx").Activate

Selection.Consolidate Sources:=Array( _
"'C:\Documents and Settings\Administrator\Desktop\[Book1.xlsx]Sheet1'!R1:R1048576" _
, _
"'C:\Documents and Settings\Administrator\Desktop\[Book2.xlsx]Sheet1'!R1:R1048576" _
), Function:=xlSum, TopRow:=True, LeftColumn:=True, CreateLinks:=False
End Sub

--------------------

can anyone help. I'll be very much grateful to you.

I'm using excel 2007 but I dont think it has got to do something with macro!

thank you in advance.

Hemen
&nbs... Read more

A:Solved: Help in macro (Excel)

This message usually occurs when the code is trying to call a workbook or worksheet that is not available. Your code opens two workbooks from your desktop (Book2.xlsx, Book1.xlsx) and then is trying to activate a workbook called Report.xlsx. If this workbook is not already open then you will get the error. You need to add some code to open the workbook prior to activating it.

Regards,
Rollin
 

Read other 2 answers
RELEVANCY SCORE 57.6

Hello,

I've used this site to create my current excel file; it works pretty good but now it need the evolve and I require some help.
I'm sure there are easier ways to get what I need; I am no expert at macro writting so please bare with me.

THe file current creates graph for me; 'data input' has a button where i input the locations i require a graph for and it simply selects info (from a master file database) and pastes it into 'sheet2' where a graphs exists.

the code is written so that it will go to a pdf print screen for me to input the name and save. this worked well but now there are so many locations that i would like to automate some functions.
what i would like the update to do is the following;

-'results table', column A, "Location" will have several locations listed (only in the white blank spots). I need the macro to generate a graph for each location listed.
-for this to occur, it makes sense that I would also require the pdf to automatically name each file ~ naming it the location that it was looking up (otherwise i will have a bunch of pdf save as files open and i wouldn't know which was which.
any and all input would be greatly appreciated. i also looked up the auto name pdf file; i did not include my attempts to add as it kept getting hung up at the 'save as' file box. i can share my pregress on that if you like.

below is my current code. Please email me so that i can send you the file a... Read more

A:Solved: Excel Macro help

Read other 15 answers
RELEVANCY SCORE 57.6

I have 50+ excel workbooks and I need to extract 1 tab from each of them and create an individual file for each.

A girl who used to work in my office found a macro or program using excel, that only works on PCs, but I have one available, thatall you have to do is have the selected tab saved so that it opens up to the one you want and paste the entire thing as values and it will do it for you real fast. The alternative is to go in and copy and paste each tab or extract the sheet in each and every one. If anyone can help me find the name of this or where I can find it I would really appreciate it. Oh ya the girls who used to work in my office moved to India, canceled her cell and I do not have her personal email so contacting her is harder than I first thought.
 

A:Solved: Excel Macro?

Read other 14 answers
RELEVANCY SCORE 57.6

Hello TECHGUYS.
We are using macro fro creating P.O.B. lis ( persons on board) , from the 3500 persons, copying only those who is on board at the moment , then grouping them by company and than sorting in alphabetical order in each group.
Now is the challenge : Is that posiible to modify macro or add another function to it to make it sort personnel of first company in the list by rank / position?
I am almost green in scriptin, but very interesting in it , but now my boss wants to see Himself on top of the list He's last name not starting from A
Thanks in advance...
 

A:Solved: Excel macro help

Read other 12 answers
RELEVANCY SCORE 57.6

Hello
I'm using Excel 2003 (on Win XP). I currently have an excel doc which I use for "form filling". There is a lot of questions, 40 or so on Tab1 and another 40 or so on Tab2. Both use "data, validation, list" for the questions (to sub sub level). Once the form is filled in it is saved as an excel file. Then I fill in the next excel doc, roughly about 50 excel docs are created for each job. I know I should probably use a database but I've never used one before.
What I'm looking for is a macro at the end of the form which I could click and it would collect data from tab1, cell A1, A2, B3, C7 and MOVE it into tab3 to a position A2 – all in a single row (i.e. B2, C2 etc). I can then amend the macro and use it for tab2, so the data is saved in tab4.
Here is the tricky part.
The first reference in cell A1 contains the “Question No” referenced as Q1, Q2, etc as a list box. Sometimes I will need to go back to a previous “question” and amend details but most of the time it’s used for printing purposes at the end of the day. Hence I will need a second macro which when clicked on will ask for “Question Number” and once I input it in, should retrieve the information from Tab2 and insert all the data back into the original cells. I suspect this is impossible as it would then paste the raw data over my “list boxes” making them unusable.
But maybe by having another tab, say “amendments” with a macro button on it, I could select the “questio... Read more

A:Solved: Need a Macro for Excel

Read other 16 answers
RELEVANCY SCORE 57.6

Hello,

I've built an excel spreadsheet and am having trouble with a part of a macro. The relevant section of the macro that I am having trouble with is below:

Application.Run "ATPVBAEN.XLA!Regress", ActiveSheet.Range("$A$1:$A$1094"), _
ActiveSheet.Range("$B$1:$C$1094"), False, True, , "PS stats", False, _
False, False, False, , False

The spreadsheet is basically a template, so as I get new data, I open it up, dump the data in, run the macros and save. The problem is, the data is often different sizes, so one day I may have 1000 rows, and the next 1400. This is not a problem with generating charts, since I can just select that it plots cells 0-2000, and it will ignore cells without data, but if I do this for the above regression, the macro will not fully run and I get an error. It's not really a big deal, as I can open up the macro every time and just edit the range to fit the data I have, but other people often need to use it so I'd like to make it as simple as copy, paste, and run macro1.

Is there a way to insert a macro within the macro so excel automatically searches the column and then runs the regression?

Something like this

Application.Run "ATPVBAEN.XLA!Regress", ActiveSheet.Range("Only rage of cells with data in them"), _
ActiveSheet.Range("$B$1:$C$1094"), False, True, , "PS stats", False, _
False, False, False, , False

I've seen a macro here on how to find cell... Read more

A:Solved: Help with excel macro

Read other 9 answers
RELEVANCY SCORE 57.6

here my situation: I have created 2 worksheets. Both are contact list.
the 1st list is of People who work in the same building as I. The second is
a list of nationwide remote users. My boss emailed me a third sheet
containing names from both list combined. the question I have is can I
write a macro to check the third sheet against the 1st two then seperate
them back out? if you need more info let me know
 

A:Solved: need help with excel macro

Read other 8 answers
RELEVANCY SCORE 57.2

I am using the MSN Stock Quote addin with MS Excel 2003. Prior knowledge of this should not be necessary, but I just thought I'd provide full context to my issue. I wrote a macro that essentially records daily stock prices. Because I don't want to store old quotes into perpetuity, i need to ensure that the update quotes button has been hit. I use sendkey() to accomplish this, and then the macro copies the quotes and pastes them elsewhere. My main goal is to have the task scheduler open this file daily so i dont ever have to think about this again, and i'm so close. Essentially my problem is that it takes a few seconds after the update button is hit for the add-in to fetch the new prices from the internet, and this process appears to be delayed until the macro is finished. This is a problem because the macro ends up recording un-updated quotes. I have tried the Application.Wait procedure, and I've tried time consuming loops, do while loops, etc. All of these approaches result in the same thing: Can someone please help me with this? I'm too lazy to hand update this spreadsheet every trading day for the rest of my life (or until i quit). Thank you in advance!
 

A:Excel Macro - Allow cells to update query before macro completes

Can't you just put the update macro code in a module of it's own and call it from the main macro?

Regards,
Rollin
 

Read other 1 answers
RELEVANCY SCORE 57.2

I have a userform that contains a textbox for user entry. What is the best way to determine if the user has just hit the spacebar a few times to enter a blank data in the textbox?
 

A:Solved: Excel Macro -> UserForm

I was able to figure it out.

I used the following:
Code:

Len(Trim(Me.Textbox.Value)) = 0
 

Read other 2 answers
RELEVANCY SCORE 57.2

Hi all,
I'm having a few problems with a macro that sorts data in ascending order in a number of different worksheets. I've created ranges in teh worksheets. There are a number of different ranges but I've attached an example of these (ranges "pm" and "rj"). The macor works on the first range but not on the second when it has to switch worksheets - any ideas!!

Private Sub CommandButton1_Click()
Application.Goto Reference:="pm"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A4"), Order1:=xlDescending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Application.Goto Reference:="rj"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A4"), Order1:=xlDescending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
 

A:Solved: Excel - Sort Macro

Read other 7 answers
RELEVANCY SCORE 57.2

I am trying to find a way to insert a formula to the last row with data using Excel coding.

Here is my layout. I only have three columns filled with data (Columns A-C). Columns A & B are not locked, but Column C is locked.

Here is what I would like to happen. I would like to create some code that after data has been entered into Column B, the worksheet is unprotected, a formula is inserted into Column C, and then the worksheet is protected once again.

Does anyoen know if this can be done?
 

A:Solved: Excel Macro and Formula

Read other 16 answers
RELEVANCY SCORE 57.2

Hi All,

First of all let me explain what i do daily. One part of wat i do is.
I pull data from mainframe system and send that information to all the other supervisor in my office.
The information which i pull is not just one or 2, Its almost 50 data information every 2 hours and in a its sums up to 200 a day,
The problem i face is i have to copy every data and paste in a letter and send it its painful to do it for every person working in our company.

So if some1 can help with a macro to do this would be great help reason is i stretch 4 hours extra everyday after my work hours to just do it. so any help will be much helpful.

These are the requirements.

> I have attached 3 excel sheets.
> 1st workbook is "Source file with data from Mainframe system" the information from this has to be auto generated into the second excel workbook file "Letter to be generated". The 3rd workbook is the information is additional information.
>The one which i have attache below is the example of just worker. Similarly there are 18 users information attached int the "Source file with data from Mainframe system"

SHAO ZING B0020 not 100% backdated 4.6
3612315-54012332192 99411 4.69 C 24/03/2012 522460629

> So these information have to present in second sheet i.e "Letter to be generated"
> In the 3rd sheet i have mentioned what information have to auto populated in the second workbook i.e "Letter to be generated"
> Finally . Whe... Read more

A:Solved: Need a Macro for Excel document *PLEASE*

Read other 12 answers
RELEVANCY SCORE 57.2

This is my first message to this forums so Hi everyone!

to the point. Im trying to make a macro that will help me submit some information to a database. The information will be put in excel table and then exported to a CRM. So I made a userform with all the textboxes and I need to make each textbox user submited text to be pasted to a cell in the table. Do you have any idea how to make this?

So far Ive written this little code but im stuck:
Code:
Private Sub CommandButton1_Click()
Sheets("Hoja1").Select
Range("B1").Select
TextBox1.Text = Range("B1")
End Sub
Thank you!
 

A:Solved: Excel Macro VBA newbie

Try this
Code:

Private Sub CommandButton1_Click()
Sheets("Hoja1").Range("B1").Value = TextBox1.Text
End Sub

Regards,
Rollin
 

Read other 3 answers
RELEVANCY SCORE 57.2

I am trying to write a macro that will copy data from on location to another if the value in a particular cell is greater than -0-. Below is my attempt which isn't working. Any help would be greatly appreciated.
MBInDe

Sub testz()
'
' testz Macro
' Macro recorded 10/20/2009 by MBInDe
'
' Keyboard Shortcut: Ctrl+z
'
If Cell("A33") = >0 Then
Range("G6:G13").Select
Selection.Copy
Range("C6").Select
ActiveSheet.Paste
End If
End Sub
 

A:Solved: Excel conditional macro

Read other 16 answers
RELEVANCY SCORE 57.2

I need some assistance creating a macro to automate a process by clicking on a button. I would like to have multiple functions performed when a single button is clicked. They are:

1. Save the active file
2. Open a new mail message (and attach the active file if possible)
3. Fill in the To: with "[email protected]"
4. Fill in the CC: with "[email protected]"
5. Fill in the subject with "Performance Tracker"

Is this possible? I have no idea where to start other than I know it will require VBA. Can someone help?
 

A:Solved: Excel Macro for Button

Read other 8 answers
RELEVANCY SCORE 57.2

Hi all, I need some help please with excel 2003 vba code. I have recorder the macro which I want to look at a cell and copy the value, select the custom filter, paste the cell value into the custome filter and then sort the results in Z-A order.

The code however (generated by macro recorder is inserting the text value rather than the cell reference.

Can anyone tell me how to edit the code please?? The part number 2000801990 is shown in red - this should be the cell reference.

Thanks

Nic

Sub engineer_consumption()
'
' engineer_consumption Macro
' Macro recorded 18/09/2008 by Nic Cunliffe
'
'
Range("B1").Select
Selection.Copy
Selection.AutoFilter Field:=2, Criteria1:="=2000801990", Operator:=xlAnd
Range("C177").Select
Application.CutCopyMode = False
Range("A8:C44630").Sort Key1:=Range("C177"), Order1:=xlDescending, Header _
:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom _
, DataOption1:=xlSortTextAsNumbers
End Sub
 

A:Solved: Excel 2003 macro help

Read other 8 answers
RELEVANCY SCORE 57.2

What is the best way to delete rows where both Column A & B are blank when the workbook is opened?

I have come up with this so far. Is there a better way?
Code:

Sub test()
Dim LastRow As Long
LastRow = [A65536].End(xlUp).Row
For i = LastRow To 1 Step -1
If Cells(i, 1) = "" And Cells(i, 2) = "" Then
Rows(i).Delete
End If
Next i
End Sub

 

A:Solved: Excel Macro and Delete Row

Read other 16 answers
RELEVANCY SCORE 57.2

Hello,
My question is "Is it possible to do what I want to do" in Excel 2003?

I would like to reformat a large list of name and address info from this format:

1. BUSINESS NAME (MILES)
ADDRESS
CITY STATE ZIP
PHONE: 000-000-0000
TYPE OF BUSINESS: XXXX XXXX

TO THIS FORMAT:

A B C D E F G
BUSINESS NAME ADDRESS CITY STATE ZIP PHONE TYPE

I HAVE NO PROBLEM MOVING THE DATA INTO THE DESIRED FORMAT USING A SIMPLE "RECORD NEW MACRO..." THAT I RECORDED.

MY PROBLEM AND QUESTION IS REMOVING THE RED HIGHLIGHTED INFORMATION.
I AM NOT A PROGRAMER AND HAVE NOT FIGURED OUT THE LOGIC IN THE 'VISUAL BASIC'.

I HAVE TRIED MANY "RECORD NEW MACO..." BUT CAN NOT GET IT TO REMOVE THIS UNWANTED INFO.

IS IT EVEN POSSIBLE TO DO THIS WITH EXCEL 2003 ?????????????????????
AS YOU CAN IMAGINE ANY HELPFUL ADVICE WILL BE GREATLY WELCOME.

THANK YOU SO MUCH.
JOHN
 

A:Solved: Excel 2003 MACRO HELP

Read other 16 answers
RELEVANCY SCORE 57.2

I am having a problem with my macro code.
First i will describe what i am doing then i will post my code for help.

I have created an open items list for work. I have created 2 identical headers, each in a different worksheet. One of the columns in both work sheets, F to be specific, is a status field. There are 3 to chose from pending, waiting on approval and completed. I have created a button at the top of the header in the open items worksheet so the when it is pushed it runs the macro and moves all of the items that have a status of complete to worksheet 2, the closed action items.
Item # Type Item Description Priority Due Date Status Owner Support Team Compl Date Updates

This is the header that i have in both worksheets.

Here is the code that i have written to move the completed actions over to the closed worksheet.

Sub ClosedItems()
Dim wsOpen As Worksheet, wsClosed As Worksheet
Dim rFilter As Range
Dim lRow As Long

Set wsOpen = Sheets("Open Action Items")
Set wsClosed = Sheets("Closed Items")

For lRow = 6 To wsOpen.Cells(Rows.Count, 1).End(xlUp).Row Step 1

If wsOpen.Cells(lRow, 5) = "90-Completed" Or wsOpen.Cells(lRow, 5) = "99-Cancelled" Then
wsOpen.Range("A" & lRow).EntireRow.Copy
wsClosed.Range("A" & wsClosed.Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial
wsOpen.Range("A" & lRow).EntireRow.Delete
lRow = lRow - 1
End If
Next lRow

End Sub
PLEASE HELP!!!!!!!!
 

A:Solved: Excel worksheet macro

Read other 16 answers
RELEVANCY SCORE 57.2

I have a macro that saves my 40 page workbook to a PDF. The problem is that it places blank pages between each worksheet in the PDF.

Is there a way to stop the blank pages from occurring?

Here is the code I am using:
Code:

ThisFile = "C:\" & Replace(ActiveWorkbook.Name, ".xls", "") & ".pdf"

ActiveWorkbook.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=ThisFile, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False


 

A:Solved: Excel Macro -> Save As PDF

I found the answer on Adobe's website. The site indicated that the blank pages were a result of all the sheets having a different print quality.

Once I changed all the sheets to have the same print quality, the blank pages did not appear in the PDF.
 

Read other 1 answers
RELEVANCY SCORE 57.2

In attempting to record a macro I accidentally created a couple macros for which I have no use. How can I delete them?
Tools / Macro brings up a list of macros, but among the action choices offered, the Delete button is grayed out.
 

A:Solved: How delete an Excel macro?

Read other 10 answers
RELEVANCY SCORE 57.2

I am attempting to write a macro that will do the following:
If A2=A1 set B2=B1
At first glance I know what you are thinking; just type that in as a formula dummy. Well, I would like it to run down an entire column of 6000+ entries such that also:
If A3=A2 set B3=B2
If A4=A3 set B4=B3
If A5=A4 set B5=B4
Etc.

I have a macro that I recorded and it gets the job done but
A) It is really sloppy
B) It does not take user selection into consideration such that
If I were to select Column E I want
If A2=A1 set E2=E1
If A3=A2 set B3=B2
If A4=A3 set B4=B3
If A5=A4 set B5=B4
Etc.

Any input will be sooo much appreciated. Here is the code I have right now that has limited functionality:
I was attempting to copy column D on this run.

Sub Macro1()
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.NumberFormat = "General"
Range("D6").Select
ActiveCell.FormulaR1C1 = _
"=IF(AND(RC[-3]=R[-1]C[-3],RC[-1]=""""),R[-1]C,RC[-1])"
Range("D6").Select
Selection.AutoFill Destination:=Range("D6:6287"), Type:=xlFillDefault
Range("D6:6287").Select
ActiveWindow.ScrollRow = 6251
ActiveWindow.ScrollRow = 6242
ActiveWindow.ScrollRow = 6233
ActiveWindow.ScrollRow = 6224
ActiveWindow.ScrollRow = 6206
ActiveWindow.ScrollRow = 6198
ActiveWindow.ScrollRow = 6180
ActiveWindow.ScrollRow = 6126
ActiveWindow.ScrollRow = 6055
ActiveWindow.ScrollRow = 5922
ActiveWindow.ScrollRow = 5761
ActiveWindow.ScrollRow = ... Read more

A:Solved: Need help writing an Excel VBA macro please!

PS I meant

I have a macro that I recorded and it gets the job done but
A) It is really sloppy
B) It does not take user selection into consideration such that
If I were to select Column E I want
If A2=A1 set E2=E1
If A3=A2 set E3=E2
If A4=A3 set E4=E3
If A5=A4 set E5=E4
Etc.
 

Read other 3 answers
RELEVANCY SCORE 57.2

can i use code in a macro button to insert and change a value in a cell, what i want to do is set up a macro button so that when it is clicked the value in cell a1 = 1, when it is clicked again the value changes to 2 and so on upto 5, when it gets to 5 a value of 1 is entered in cell b1 and the value in cell a1 reverts back to 0, or is there a different and easier way to gets this to happen.

many thanks
scouse13
 

A:Solved: excel macro button

Will you follow the same logic and then move to cell C1 after 5 clicks have been made on cell B1? What exaclty are you tracking?

Rollin
 

Read other 2 answers
RELEVANCY SCORE 57.2

I have a macro in excel which auto fills a specified column with the formula in the first cell.

Assuming that Row 1 contains my headers, the code looks as follows:

Range("M2").Select
Selection.AutoFill Destination:=Range(M2:M1845)

Is there a way instead of specifying the range to ask the macro to just carry on filling the formula until it reaches the end of the data entered, i.e. the last row of data?

I'm sure it was something like Range = xlDown, but every attempt seems to fail.

I am running Excel 2007 by the way.
 

A:Solved: Excel Macro Code

Try using

Selection.AutoFill Destination:=Range("M2:M" & Cells(Rows.Count, "M").End(xlUp).Row)

Rollin
 

Read other 2 answers
RELEVANCY SCORE 57.2

I'm sure this is a simple task for you boffins out there.

In Col A, I have a list consisting of a series of number ie
24,56,23,98,34,77,01
65,98,12,17,36,99,31
etc
Unfortunately, these lists of numbers are taken from several different sources and some contain spaces ie
24,56,23,98,34, 77,01
65,98, 12,17,36, 99,31
etc
I just need a macro, which I can then assign to a toolbar button, which eliminates these spaces.
All the list is contained to Col A and the number of rows varies from, say, 18 rows up to possibly 25.000 rows.

I'd greatly appreciate any help with this please.
 

A:Solved: Excel - Need simple macro

Read other 6 answers
RELEVANCY SCORE 57.2

Hi there,

Could anyone help me with a formula or macro that will read the data in column A and then display a value in column C in the attached .xls?

EZ-Links would display 5
Hutton would display 3

Many thanks!
 

A:Solved: Excel Formula or Macro help please

Place the following formula in C11 and copy down for all rows. Will there ever be any other values that you need to check for?

=IF(A11="EZ-Links",5,IF(A11="Hutton",3,""))

Regards,
Rollin
 

Read other 3 answers
RELEVANCY SCORE 57.2

Could someone explain the code below?
Code:

Cells(8, Weekday(Date) + 2).Select

I understand that the code is looking at the 8th row, but I am a little confused on the ColumnIndex.
 

A:Solved: Excel Macro Explanation

Read other 8 answers
RELEVANCY SCORE 57.2

I want to write a macro that points a cell to the next cell of a row. Ie, the cell currently is set to "=AA3" and I want the macro to take the reference to cell AA4, and then AA5, and then AA6, etc. each time the macro is initiated.

Ideas? I am great with formulas but bad with macros! Is this one I need to write or I can record the macro?

Thanks for suggestions!
 

A:Solved: Macro Question for Excel

I think an easy way is to "hide" an incriment value somewhere outside your data table - possibly on a different sheet.
Lets say this value is in cell ZZ99, and that your list of data that it needs to go through is in line 2.
The formula in your resulting cell should now be: "=OFFSET(A2;0;ZZ99)"
Now you start the value in ZZ99 off at 0, and your macro would simply incriment this value. The formula will return the value A2 when ZZ99 is 0, then when ZZ99 becomes 1 the formula will return the value of B2, etc.
 

Read other 1 answers
RELEVANCY SCORE 57.2

This is my first message to this forums so Hi everyone!

to the point. Im trying to make a macro that will help me submit some information to a database. The information will be put in excel table and then exported to a CRM. So I made a userform with all the textboxes and I need to make each textbox user submited text to be pasted to a cell in the table. Do you have any idea how to make this?

So far Ive written this little code but im stuck:
Code:
Private Sub CommandButton1_Click()
Sheets("Hoja1").Select
Range("B1").Select
TextBox1.Text = Range("B1")
End Sub
Thank you!
 

Read other answers
RELEVANCY SCORE 57.2

Hi,

I am sure this is easy to fix, but...
Recently XLGuru and someothers kindly helped me with a macro that puts page breaks in whenever data in a column changes. I have that saved in an Excel file on my desktop, and when I run it on other files Excel first opens up that file and reads the macro from it.
What I would like would be to have that macro always available as an integral part of Excel, so I can delete that example file.

Thanks in advance.
 

A:Solved: Saving Excel macro so always available?

The macro (or a copy of it, if you prefer) needs to be stored in a workbook named personal.xls, in your xlstart folder. Just record something really basic, but in the Record Macro dialog, specify to store in Personal Macro workbook. If personal.xls doesn't already exist, it will be created. Then you can place any other macros you need to be "globally available" in personal.xls module(s). Although you'll probably have to unhide personal.xls (Window menu) to tinker with it (placing it in xlstart makes it open whenever XL runs, but by default it opens hidden).

Rgds,
Andy
 

Read other 2 answers
RELEVANCY SCORE 57.2

I am trying to get make a macro/script to hide cells based on what cells on another sheet are filled.

If A1 is filled in sheet 1 then I want 2 columns to show on sheet 2
If A2 is filled in sheet 1 then I want 4 columns to show on sheet 2
Etc.

I currently have macros to hide the appropriate columns and have them assigned to buttons. I want to eliminate the buttons and have sheet 2 automaticly format based on which cells on sheet 1 are filled.

Any suggestions? I am sure I will hvae to use VB. I think I can get it to run a macro if a cell is filled but how do I get it to run based off of the highest cell thats filled. If A5 is filled then use macro for 10 columns ignoring cells A1-A4.

Hope this makes sense.
 

A:Solved: Excel, VB, IF Statement to Run Macro

Read other 11 answers
RELEVANCY SCORE 57.2

Hi,

I'm a very new VBA user and have spent the better part of 2 day on this great website looking for a similar problem i've run into.

My problem is that i want information from "test" workbook~"results" worksheet to automatically update the "Tech Data" worksheet as well as export an update to the "Master" workbook.

FYI, two separate people input data: iron&manganese and Corrosion&scale inhibitor residuals. This data is exported to the 'results' worksheet and the same simple formula can be used to export to "tech data" worksheet. I am having a hard time getting the 'tech data' worksheet to export to the master workbook. I'm hoping someone can help me ensure the master file compiles all informaiton being exported to it. Note that the master file has several other headings as i was hoping to expand on the starter macro.

I created the tech data worksheet so data placement matched the master workbook format.
 

A:Solved: Excel-macro code help

Read other 15 answers