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.8

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.8

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.8

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 58

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 58

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 58

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 58

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 58

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 58

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 58

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 58

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 58

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 58

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 58

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 58

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 58

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 58

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 58

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 58

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.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 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

I currently have a macro which I use to assign names in coloumn W. Depending on the total number of rows I equally divide it. This is a sample macro

Sub Macro1()
'
' Macro1 Macro
'
Range("W1").Select
ActiveCell.FormulaR1C1 = "Name1"
Range("W1").Select
Selection.Copy
Range("W2:W561").Select
ActiveSheet.Paste
Range("W562").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Name2"
Range("W562").Select
Selection.Copy
Range("W563:W653").Select
ActiveSheet.Paste
Range("W654").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Name3"
Range("W654").Select
Selection.Copy
Range("W655:W675").Select
ActiveSheet.Paste
Range("W676").Select
End Sub

So lets say today I have 22543 rows of data. Now I will divide it by 16 (because I have to assign it to 16 people) 1409. I want to be able to assign 1409 rows to each name total 16 (copy pasting or however) using a macro?

How can this be done without modifying the macro every day, I usually go in and change the numbers under Range.

Thanks
 

A:Solved: Excel Variable macro help

Read other 16 answers
RELEVANCY SCORE 57.2

I have:
A worksheet with 11 columns, about 400 rows, with mostly text data.

I want:
To create a "Search" button on the spreadsheet that opens a form with a text box to enter search criteria, with a "Search" button and a "Cancel" button. When the user enters criteria and clicks "Search," rows with cells matching the data return in a different worksheet.

The problems:
Say the user wants to search for "Texas." Texas could be in several cells within the same rows - B7=Texas, C7=Texas Study, D7=Go Texas, E7=Texas, Texas, Texas, etc. So I don't want it to return the same row 6 times since it has 6 different instances of "Texas."

As shown above, the specific keyword they're looking for may be buried in other text within the same cell, so the search function needs to sort through and find all the instances.

I'm a beginner to this macro stuff, but I have the basics down. I just need help with a code for the search function. Any help would be appreciated!
 

A:Solved: Excel Search Macro

Read other 12 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 working in Excel 2002. I have a file that is basically a list which includes name, address, city, state, zip. After the zip the next cell contains a number 1-10. For any record that has a number >1, I need to insert that number of rows minus 1, and copy the record down into the new rows.

For instance if the number is 6, I would need to insert 5 rows below that row and copy the row down into those 5 new rows.

I created a set of macros to perform the function, but I still have to manually go down through the entire spreadsheet and run the macro on every row. Is there any way to do that globally?

Thanks
 

A:Solved: Excel (macro?) help needed

Read other 8 answers
RELEVANCY SCORE 57.2

I know this should be very simple, but for some reason I cannot recall how to select last row in Excel.
 

A:Solved: Excel Macro Select Last Row

I believe I have figured it out.
Code:

With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
Range("A" & LastRow2).Select
End With
 

Read other 3 answers
RELEVANCY SCORE 57.2

Hi,
I am in some major need of help.

I'd like a macro -- actually a plug in/add-in if that can be set up -- that finds the maximum DPI print quality setting of a worksheet within an Excel workbook (this is the setting under File | Page Setup | Page tab | Print Quality), and will take that max value and make it the default DPI setting for all of the pages in that same workbook.

At the same time, I'd like to have a custom footer placed on all of the pages of the workbook that reads something along the lines of "My footer text - Page x of y".

If possible, I'd like this plug-in to run upon saving of the Excel file.

Thanks very much!
 

A:Solved: Excel Macro help needed, please!

Read other 16 answers
RELEVANCY SCORE 57.2

I need a macro that will prompt the user for a number, then will search a column of data and give the user a green light if the number is already entered or a red light if the number is not already in the data base. Preferably I would like the data base as a separate workbook so it could be updated remotely while the program is running at an operator station. I am new to excel and was wondering if there is a clean simple way to do this.

Thanks,
Allen
 

A:Solved: Excel Search 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

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

Well...I've been reading some of the posts regarding Excel, and it look like Zach is the man!...the expert! Not to say anything less about anyone else.

Anyhow, I'm getting better at my formulas and macors, but I need some help. I need a formula that calculates the anniversary of employee's start date. I would then like the conditional formatting to change the colour to yellow if it's 11 months after their start date...then red if it's on or after their anniversary date.

But wait...there's more...

I would also like Excel to automatically send a reminder email to me when the first condition (yellow) is met.

I've attached the worksheet (not very complex).

Any help would be appreciated.

Thanks!

TBaker14

 

A:Solved: Excel Formula and Macro help

Read other 7 answers
RELEVANCY SCORE 57.2

Hi there

I have been slaving away for hours trying to figure out the code below:

If Range("C16") > "11:00:00 AM" Then

More code goes here.

It does not work!!

Can someone provide me with the correct VBA code??

Mario
 

A:Solved: Excel time VBA macro

If Range("C16") > TimeValue("11:00:00") Then
Msgbox "Have a good birthday, Mario!"
End If
 

Read other 2 answers
RELEVANCY SCORE 57.2

I need an excel macro to move fields from two rows to one row for about 5000 fields.

Example
Current Excel File:

Col1 Col2 Col3 Col4
Row1 ID# Address Ph1 Ph2
Row2 IDName city,st,zip ven#
Row3 <<<BLANK>>>
Row4 <<<BLANK>>>
Row5 ID# Address Ph1 Ph2
Row6 IDName city,st,zip ven#
Row7 <<<BLANK>>>
Row8 <<<BLANK>>>
This continues for about 5000 more fields
Need the file to be
Col1 Col2 Col3 Col4 Col5 Col6 Col7 Row1 ID# IDName Address city,st,zip ph1 ph2 ven#
Row2 ID# IDName Address city,st,zip ph1 ph2 ven#
<<<<Continued for all vendors>>>>

They don't necessarily have to be in that specific order I just want the each vendor and their information on one row.

Any help you can provide is much appreciate.
 

A:Solved: Excel Macro Needed!!!

Welcome to the board.

As long as Row1 means Row1 (not first row with data), then:

Sub test()
Application.ScreenUpdating = False
x = Range("A" & Rows.Count).End(xlUp).Row
For Each Cell In Range("A1:A" & x)
If Cell.Row Mod 4 = 1 Then
Cell.Resize(, 4).Copy Cell.Offset(, 5)
Cell.Offset(1).Resize(, 3).Copy Cell.Offset(, 9)
End If
Next Cell
Columns("F:L").SpecialCells(xlCellTypeBlanks).Delete Shift:=xlUp
Application.ScreenUpdating = True
End Sub

Try it in the attached, then on a copy (for safety) of your real data.

HTH
 

Read other 2 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

Hi everyone,
does anyone know how can I accomplish the following:
I would like to pop a message when I enter a qty. this field will add a amount time the qty then the result will be added for a total of rows. If the result is greater a 100 then I need to popup a message to warm the user.
I know data validation do something like that but only when you are in that cell.
If anyone have any idea of how to do this please let me know

Thanks,
AMD2800
 

A:Solved: Excel question Macro or VB ?

Read other 10 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

Hi Guys

I have a Excel spreadsheet that has a lot of sheets. On the header sheet I have created a checkbox next to the names of each sheet, say "A", "B", etc

I've tried to create a macro that deletes all the sheets with the checkbox checked but unsuccessful so far. Can you guys please help me?
Also what's the best way to get to the sheet from header sheet without slowing down excel too much please? Hyperlink?macro?
 

A:Solved: Need help re Macro in Excel 2003

Read other 16 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

I am trying to come up with a macro that once executed will go to a defined name, insert a row, copy what is in row one and then paste the copy in the row that was just inserted.
 

A:Solved: excel macro copy

Read other 7 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 have this spreadsheet with a button at the top that runs a macro (I assume) to add a row to a list of contacts. Since the original macro was created, I have added columns of additional information to the spreadsheet. So now, when I use the button to add a contact it only shifts the first 8 columns of information. I want to edit this to have it include the additional columns. However, when I go to Tools-Macros and select the macro in question, I do not get the option to edit it (grayed out). I've checked the worksheet security and the macro security, to no avail. What else could be keeping me from being able to edit this macro?
 

A:Solved: Excel Macro - can't edit

Read other 7 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

This post is related to an earlier one, which has now been solved and closed:http://forums.techguy.org/business-applications/955009-excel-2007-lookup-formula.html. The macro outlined in this thread works fine as long as there are 4 values in each row the macro references. If there are less than 4 values the formula errors when trying to return the

Code:
WorksheetFunction.Large
value. Could somebody please edit the macro so that if it causes an error due to too few values, that it will then break out of the code instead of keep running? The ideal situation would be that it outputs any values it finds, and skips past and carries on if the function errors.
 

A:Solved: Excel Macro Error

No problem - all sorted now A bit of out of the box thinking was all that was needed!
 

Read other 2 answers
RELEVANCY SCORE 57.2

Hi there,
I've cobbled below code together (I'm game but probably not even a pedestrian in VBA, maybe more of a snail) to take some information from an Excel sheet and put it into an e-mail. I also want the active workbook attached to the e-mail and if possible another file with the same name but in pdf (haven't looked at that yet).

The ErrorCatch says it's an object or applications driven error.

I'm not sure about this line: .Attachments.Add ActiveWorkbook.FullName but really have no clue where the problem is.

Any help would be greatly appreciated. Thanks.

Christine

Function GetBoiler(ByVal sFile As String) As String
'Dick Kusleika
Dim fso As Object
Dim ts As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)
GetBoiler = ts.readall
ts.Close
End Function

Sub Mail_small_Text_Outlook()
'Working in Office 2000-2010

Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim SigString As String
Dim Signature As String

On Error GoTo Errorcatch
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

strbody = "Hi Leon" & vbNewLine & vbNewLine & _
"" & vbNewLine & _
"Attached invoice for " & Cells(C14) & ".Can you please approve for payment?" & vbNewLine & _
"Supplier: " & Cells(E43) & vbNewLine & _
"Invoice Number:&quo... Read more

A:Solved: Error 400 in Excel Macro

Read other 14 answers