vba .formula

  1. Z

    VBA: notify when number switches from positive to negative and vice versa (Excel)

    Hello, I have a column in Excel with both positive and negative numbers. I would like to receive through VBA a notification on screen every time in the list a number switches sign from one row to the other. The notification is different with a change from positive to negative than from negative...
  2. Z

    VBA: Calculate average based on data from previous column, variable length

    I'm trying to figure out how to proceed in calculating an average with following conditions: In column B, I'm looking for the average of variable length, defined by a Time value (e.g. 5 from cell 'Time') meaning this would be the average of the 5 first numbers from column A. The average...
  3. J

    IS there VBA code to Data compare and result in another col

    =IF(COUNTIF($A$2:$A$7,C2)>0,B2,"")</PRE> The problem is that the value that is being place in the cell is not the correct value. In this case NIMOOC30 is in A2 and the value associated with NIMOOC30 in B2 is 6. Hoever the value returned in D8 for NIMOOC30(C8) is 4. I need it to be 6 <TABLE...
  4. J

    Data compare and result in another col

    I have DAta in Col A (Med ID ) and B has number of events assocaited with the unique ID. The Unique ID is also in Col C from another data source. I wnat to return the value from Col B in in Col C that mathces the MD ID if available. There are several more col in the sheet that have other...
  5. Z

    calculation on every sheet through VBA

    I try to make the same calculation on every specifically named sheet of a file. The structure of every sheet is the same, only the length of rows varies. How can I write this in VBA? Thank you.
  6. Z

    VBA: Choose with drop down list column A or B to calculate

    Hello, I have 2 columns with a variable number of rows in Excel. With VBA I want to perform a calculation on either column A or B. I make that selection through another specific cell where I define a drop-down list with titles of each column to choose from. Through the selection of a column in...
  7. L

    Dropboxes and VBA code in Excel 2007

    Hi folks, I need your help. I have the following situation. In a sheet2, I need to create drop-boxes (based on another Sheet1), one listing names of retailers, one some criteria (called "A"), one criteria "B", one "C", one "D". One is supposed to select one OR MORE names from each list (each...
  8. andrewb90

    Private Sub Worksheet Change Merge problem

    I have two worksheet change codes I am trying to run on the same page and I have tried putting them together but get odd results. Here is what I have: Private Sub Worksheet_Change(ByVal Target As Range) 'Line Highlighting Tool '>>>>Left Side<<<< Range("B11:G36").Interior.Color = xlNone Set S =...
  9. G

    Excel Visual Basic Question

    I have a phone bill that i have copied over from a pdf. I have used the text to columns tool to convert it into a usable format, with numbers and charges incurred etc in separate columns. I am attempting to write some code that will search through the phone bill and highlight the entire row...
  10. D

    Problem selection column (merged cells)

    Good morning, I have an excel sheet with data in 4 columns, i am want to create a macro that delete the first column, i m using this code: Columns("A:A").Select Selection.Delete Shift:=xlToLeft there is some merged cell (A:D), so the macro select the 4 columns. I learned this code...
  11. T

    VB Script IF field is blank

    Hi, Even though this is my first post to this forum, I have visited and browsed these forums many times and have been helped from the questions that others have asked. I am having trouble trying to write a VB script (as I am new to VB) to blank out (delete) information from one cell IF...
  12. J

    Help please! Copy whole row if cell includes "x"

    Hi, Basically, I am creating some data and I am a bit stuck :eeek:. I would like to say: If any cells in column c have the word "Giant" in it (there will be a sentance in each cell but I would like it to pick out the specific word) - Then please paste the whole line into sheet 2. Is this...
  13. C

    Creating Report with VBA Hung Up

    Hi Yall, Would Like to create a report on a seperate worksheet (in the same excel document) in which presents all the data in 2 columns (time in 1 and comments in the other). My original worksheet contains 64 columns, 32 columns in which contain "work comments", and each of those columns has an...
  14. J

    Macro to input picture

    I'm trying to write a macro that will read a number in a cell and go into a file and retrieve the picture that correlates to that number. As an example if I put 0600 in A1 i want the macro to go into a file and pick out the the 0600.jpg.
  15. L

    VBA - inserting formula in cell

    In a VBA macro I'm trying to insert formulas into a cells on a sheet. Problem is, the formulas include single quotation marks (around sheet names), and VBA hence reads this as a comment: Here's an example: Range("A4").Formula = "=IF(INDIRECT("'Input'!A"&2)="";"";INDIRECT("'Input'!A"&2))"...
  16. E

    A problem on VBA

    Hi everyone, I get a problem with my VBA codes, As you can see: Sub Flexible_average() Dim n As Variant Dim q As Variant Dim m As Variant Dim L As Variant n = 7 rng1 = Range("A4").Value rng2 = Range("A5").Value Set Wtf = Application.WorksheetFunction For i = 0 To 25...
  17. I

    Array/Index Formula result always 0

    Hi, I have a 25mb spreadsheet which runs quickly and without fault (the bulk of the spreadsheet in Macro text). I'm running a Macro which inserts an array/index formula into the spreadsheet (eg formula below), this is runs perfectly and gives the desired result when running all months of the...
  18. T

    HELP! Macro/VBA needed for opening excel file

    Hi, I need to create a macro and I have no idea what I'm doing using VBA and recording doesn't really work. Can anyone help?? I think I will need several macros but I want to be able to look at a cell in the macro template file (eg cells B8, B47 and B87) which has my "File ID" and then open...
  19. I

    VBA Formula R1C1 help

    Hi, I have the below formula [in Red] writen in VBA but unfortunatly it doesn't work, if I run the code it pastes the whole line as text within the cell, if I then click on the cell and press ctrl+shift+enter it works perfectly. One of the Mods on here said that it's because I need to use...
  20. I

    Refrancing xlExcelLinks - VBA

    Hi, I have the following simplified array formula in cell A1 Sheet1, If I wanted to update the link within excel itself I would simply click Edit>Links>Change Source and job done. The issue is that this formula needs to be within a macro and just the result displayed in cell A1 Sheet1...

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