i.value

  1. C

    Getting the formula in this For loop to include the current column(colnum)

    This code Dim X As Range Sheets("Budget").Select For i = colnum + 1 To 54 Cells(30, i).Value = Cells(30, i - 1).Value - Cells(18, i).Value If Cells(30, i) = 0 Then MsgBox "Balance is 0 at col " & i & " " & " and week " & Cells(2, i) Range(Cells(30, i...
  2. L

    Vba help 1 line

    Hey guys... This is going to be hard I think. If Range("i" & i).Value >= 0 Then Range("P" & i).Value = "/1000" What I'm TRYING to do is if values are found over 0 in column i then divide values from column i in column p Obviously this code is wrong - As all it's doing is placing "/1000". Is...
  3. gssachin

    How to add signature to my automail in VBA

    Dear All, I m using following codes to generate auto mail. In that I want to add signature. Please help Sub automail() Dim R As Range Set R = Sheets("PIVOT").Cells Dim i As Integer For i = 2 To 6 Range("B5").Select...
  4. B

    VBA Failure to delete!

    What’s wrong with my code? Each cName is found on each sheet and the Delete procedure is performed. (as witnessed during debugging) However, only Sheets(“Net”) and (“ADJ”) Ranges actually get deleted. Identical code for any sheet between (“Net”) and (“ADJ”) the Range remains. During...
  5. M

    Line spitting with specific characteristics

    Hello there. I have a situation. Every once a month i have to deal with some addresses. I have managed so far to remove some useless information like this <colgroup><col></colgroup><tbody> ΗΡΑΚΛΕΙΔΩΝ 36 ΑΘΗΝΑ 11851 ΑΤΤΙΚΗΣ ΗΡΩΩΝ ΠΟΛΥΤΕΧΝΕΙΟΥ 23 ΑΓ.ΣΤΕΦΑΝΟΣ 14565 ΑΤΤΙΚΗΣ ΠΥΡΓΙΩΤΙΣΣΗΣ 29...
  6. M

    Trying to modify code to run when user leaves a sheet

    Hi all, Apologies, I've been doing some reading and little out of my depth. I'm trying to convert the below code to work with worksheet_deactivate() command (when leaving a worksheet "Rebate Conditions"), however not having any luck. It works as a macro in a button on the sheet, just not when...
  7. V

    Only copy cells value based on UID

    Hello all I have this code which copies over values from the active worksheet to a sheet called "Actions" under the next available line if the value in "G" is equal to "A" Can anyone help me please, I want to also only copy over only unique lines. (UID) "B & E" together would be the UID but I...
  8. R

    Mutiple Event Handling (SpinButton/TextBoxes)

    Hi Folks, New User; new to VBA. Retired, working on an app for personal use. Main problem is, I don't know what I don't know. :eeek: I've checked the couple of books I bought (which helped some) and searched online (including here) with mixed results. I'll pare down my examples for...
  9. C

    Combining results of two textbox values into one textbox...

    This code works perfectly Private Sub UserForm_Initialize() Dim x As Range Application.EnableEvents = False Application.ScreenUpdating = False Sheets("Budget").Select For i = colnum + 1 To 54 Cells(30, i).Value = Cells(30, i - 1).Value - Cells(18, i).Value If Cells(30, i)...
  10. H

    Copying a RAnge of column with a variant number of rows

    Hello, in my code, I am trying to copy a certain number of columns which is constant. With this, i am trying to copy a cartain number of rows that is variant. My code doesn't seems to work because I have an error 1004: method of Range as failed. I hope that someon e could help me, thank you. k...
  11. J

    Please help with input box

    Hello, below VBA code works for me, i am comparing 2 columns and deleting the entire row if the values are the same. the columns to compare will vary, so i need to add input box(es) so that the user can put in the 2 columns that they want to compare. Sub Delete_Same_City() 'delete row if...
  12. G

    Macro is skipping the first available empty cell and instead pasting data several rows below

    Hi everyone! Honestly this has stumped me for a while now. So my macro deals with sending some data from one excel file to another. I am having this weird glitch where sometimes the data will not be pasted to the next available empty row but instead it gets pasted about 150 rows lower than...
  13. C

    Getting a For Loop to work correctly on a range...

    This works correctly… For i = colnum + 1 To 105 Cells(30, i).Value = Cells(30, i - 1).Value - Cells(18, i).Value Next ...but this code performs the calculation all the way out to col 105 even if there are no values in cells(30,i) and cells(18,i) when this is not necessary and and...
  14. D

    Vba Could not find the specified object

    Hi. I have this code below but i'm getting "Could not find the specified object" (error on Me.Controls) please help. thanks Private Sub CommandButton1_Click() Dim i As Long Dim LastRow As Object For i = 0 To 21 Set LastRow = Sheet4.Range("a65536").End(xlUp)...
  15. A

    Type Mismatch Error When calling Sub

    Hi I have a procedure that runs fine when I run it standalone but when I call it from another sub it generates a Type Mismatch Error (run time error 13) For i = 4 To ColNum Cells(8, i).Value = Cells(4, i) / Cells(5, i) 'calculate standardized Sheets("Probit").Cells(11, i).Value =...
  16. D

    How to compare sheet cell values for better performance?

    Hello, I have developed the following code to compare cell values and color it. I know my code is accessing the sheet every time which makes program slow a for a large number of comparisons. Is anyone have an idea to optimize the code using array OR any other way to run faster than this? Thank...
  17. M

    Do While

    I have a spreadsheet that looks like: <colgroup><col><col span="2"></colgroup><tbody> Wrap Week 40 Week 41 Agent 1 0:05:00 0:08:20 Agent 2 0:06:40 0:03:20 Agent 3 0:05:00 0:05:00 0:00:00 0:00:00 </tbody> I have the below code to e-mail me to tell me if Week 41 is higher/lower/the...
  18. G

    vba with multiple if/or criteria

    Hello, I have been using the following code to calculate annual targets, 'Rolling Target' Dim Addvalues If Cells(i, 6).Value >= 1 Then Addvalues = Range("p" & i).Value + Range("s" & i).Value + Range("v" & i).Value + Range("y" & i).Value Range("ab" & i).Value = Addvalues + IIf(Cells(i, 6) <= 8...
  19. C

    ActiveWorkbook

    Hi, I'm wondering how I can change this line of code to make my field (CsaveDAYS) contain both the value AND the format from my range ("D" & i). Thanks in advance for your help! Bonnie CsaveDAYS = ActiveWorkbook.Sheets("Summary Sheet").Range("D" & i).Value
  20. C

    Transfer data to another workbook

    Hi friends, I have invoice and sales sheets on my workbook,when i save invoice data copied to same workbook sheet "sales". I want to transfer data to another workbook. Path c:\workbook2.xlsm below is my code. Thanks Sub SavingSalesData() Dim rng As Range Dim i As Long Dim a As Long Dim...

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