excel 07 vba code

  1. thechazm

    For each cell in range problem

    Hello All, First time posting here so hello :D I am having a problem with scrolling through each object in a for each loop. Code: Function detectDateRange(xlsRemoteApp As Excel.Application, xlsRemoteWB As Excel.Workbook, xlsRemoteSheet As Excel.Worksheet, strSheetName As String) Dim...
  2. M

    Excel 2007: Tried Grouping/Protect VBA and did not work - Need to have both

    I have been trying the many different solutions over the various forums regarding protecting the cells/workbook but retaining the ability to utilize grouping. This is not a worksheet that I will be able to activate or frequently open & close as it is due to go up on Sharepoint and will be owned...
  3. C

    Batch Card Creation with changing tonne numbers

    Hi, I'm hoping someone can help me, I am making a batch card for work, that shows a batch number and weight that is fixed but changes for each tonne printed off. I have used a user form to get the number of tonnes etc. and need it to print on each card tonne numbers up to the amount entered...
  4. A

    VBA Error 2110 - Help!

    I've been working on a userform at my house. All I have done so far is the userform1 page design and a button on the excel spreadsheet itself to run the macro. On my laptop and my desktop at home, they work just fine. But on my work computer(s), they bring up the Error 2110. I'm not sure how...
  5. P

    Macros program to match and find difference between two values

    Hi Guys., I got stuck into a problem while using Macros. I would like to find the difference of two values in the same column if the particular criteria matches.. Actually i was trying in Excel using the formula =IF(($V$2=V3)=TRUE,J3-$J$2,""). Could some one hlep me with macros program as I'm...
  6. J

    Text import spilling over into new columns

    I'm importing several small 2 column data files of dates with variations of the following macro: After importing a few rows correctly the macro starts creating new columns and saves the data there. The macro was captured using Data ==> From Text. This import ran ok.
  7. cvincent

    Excel 2007 VBA to Save File and EMail as Attachment

    I am having trouble with this macro. The file is a form the user completes (v1), then clicks the macro to submit (v2). In doing so, a new version is created. The user goes back to his form, and has a button he can clear the form and submit a new request. But now the form is actually named...
  8. S

    VBA Code to select multiple Pivot Items

    Hi Guys, I am trying to select multiple pivotitems in an OLAP cube pivot based on a dynamic list. The code is below. when I run the macro and loop is completed, one the last item on the list is selected. I want all the items on the list to be visible. Was wondering if anyone can please fix the...
  9. Z

    VBA: groups in table with time selection (Excel)

    I try to conditionally select rows from 3 groups. I have a table that can be divided in 3 groups (defined by 3 values of column B) as shown in attachment. I would need to find out the following: if group 1 (value '1G') appears, then if group 2 (value '3G') appears within 10 minutes, and then...
  10. Z

    VBA conditional selection of ranges in table

    Hi, I have an Excel table with different dates, times, etc. This table can be divided into 3 ranges or arrays, based on column 'C'. 'A' --- 'B' --- 'C' date - time - 1 date - time - 1 date - time - 2 date - time - 3 date - time - 3 date - time - 3 etc. I'd like to know how in <acronym...
  11. Z

    VBA conditional selection of rows in table with multiple ranges/arrays

    Hi, I have an Excel table with different dates, times, etc. This table can be divided into 3 ranges or arrays, where I compare between the 3 on a time dimension. 'A' --- 'B' --- 'C' date - time - range 1 date - time - range 1 date - time - range 2 date - time - range 3 date - time - range...
  12. Z

    VBA comparing signs of rows in 2 columns

    Hi, I am comparing the signs of rows in 2 columns. If the sign is different, I want to multiply the 2nd column by (-1). I have the code below, but it is not working. For k = 2 to k If sgn(k,"O")<>sgn(k,"P") then range("P"&k)*(-1) Next k End If
  13. Z

    VBA compile error: sub or function not defined

    Hello, I receive an error code 'compile error' on 'Sum' for the following code: d=5 (line 311) Range("M" & d + 1) = Sum("M2:M" & d) '** Test: this sum must be zero ; Compile error: sub or function not defined (Sum) (line 422) This seems to be standard code? The definition of 'd' is made...
  14. Z

    VBA: looping through range k with 3 different actions depending on row

    Hello, I'm looping with VBA through a range (2 columns) and need to perform 4 different actions. In column O, row 2 (the 1st cell) I have action A, in the last cell, action C, and in the cells in between action B. In the second column, I perform Action D for the whole range. The # of rows is...
  15. Z

    VBA: sort formulas instead of values

    Hello, I'm trying to sort a column from high to low and I have the VBA code for this. However, because the column to be sorted has formulas, that does not really work. Can you change the VBA so that the sorting would happen on the values of these formulas instead? For the moment I do not wish...
  16. Z

    VBA: generate column values for 2nd, last row and in-between ( in Excel)

    Hello, I'd like to know if you could please help me with VBA code for generation of row values in 1 column. I'm looking at how I can write in VBA a macro that generates values in a particular column (say 'x') that has a few hundred rows (of variable length) within a table. I would define these...
  17. S

    Excel 2007 VBA: Copy range to PowerPoint; ppPasteMetaFilePicture works; ppPasteHTML doesn't

    Anyone have any ideas what I'm doing wrong here? Code selects a graphic, pastes it into PowerPoint. Works fine Code then selects a range, pastes it into PowerPoint. MetaFilePicture works, HTML doesn't. (Wanted to use HTML to create a table, not just a picture) Code...
  18. Z

    VBA in Excel: define file to open (I retrieve data from 2 Excel files)

    Hello, I have just created with VBA a new Excel file (A) that I will develop further (i.e. run more VBA on it). I also have a source Excel file (B) in which I have source data to run VBA scripts. So it is important to specify from which of both Excel files I read data (A or B) or write in...
  19. R

    How to use nested arrays to store a cell's value and its rowcount

    I have a simple piece of code written which basically scans through column A, detects for a condition and once the condition is met in a row, it copies the cell in column B of the same row into an array. I was hoping someone could help me make a nested array which would not only store the value...
  20. T

    Save File as the "FileSelectedtoOpenInMacro(Extract)"

    When run, my macro prompts the user to select a file to copy, which it then copies the specified sheet & pastes to a new sheet. The selected file will then close and the macro then formats, deletes, etc. the data in the copied sheet. I then want to save this new formatted file as the name of the...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top