for and formula vba

  1. H

    Revision in code requested to avoid hanging of Excel Workbook

    I am using a Function findhigh as Function findhigh(a As Range, b As Range, c As Range) As String In the code. Then I am finding number of 1s in c Range using y = Application.CountIf(c, 1) Now the code works smoothly when If y >= 3 Then If a(y) = 0 Or a(y) = "" Then GoTo finish If...
  2. M

    Excel VBA Help

    Hello Everyone, I need some help with the data below. So, I'm trying to assign numbers to the Values in Column B. For example ,if Column B has Apple in it and I assign it 22, I want the next item on the list to be 23 and so on. Same items should have same value, as you can see in Column A. How...
  3. O

    VBA: Help with my logical test to remove spaces

    Hi, I am using a macro to pull data from a PDF sadly for some reason when I pull the lines of data random "." appear in the data. I have a test to run through each line and format the special characters out but sadly It condenses everything down, so now instead of removing all characters I...
  4. T

    Why I received type mismatch error when running elseif statement?

    I did not run into any problem when I used `Range` function for a specific observation (e,g, `Range("A4")`. But when I wanted the same result to be replicated for each row, I changed to `cells` function (e.g. `Cells(x,15)`), and received "Type Mismatch" error for ` ElseIf Cells(x, 1) <> "" And...
  5. C

    calculating the sum sum of numbers in one cell and dividing it to two percentages

    Hello, Im making an invoice and need some help! How can I create a formula that automatically calculates the 'Total' considering that the prices (Price 1 and Price 2) are in the same cell, separated by rows, and in a 'number/text' format (50EUR)? Also, how can this formula calculate new prices...
  6. F

    For loop step back

    Hi, I have loop: For j = 10 to 500 x= ws.Range("C" & j).Value If x = 0 Then ws.Range("A" & j ).Select Selection.EntireRow.Delete End if next Example: j = 10 x = 0 Row is deleted, but code should once again check j=10, because when row is...
  7. F

    adding new values if not exist

    Hi, I have simple loop: For i = 1 To x_country For j = 1 To x_rows_data If wsS.Range("BM" & i).Value = wsSD.Range("F" & j).Value Then 'check if is on list k = k + 1 wsS.Range("BP" & k).Value = wsSD.Range("B" & j).Value...
  8. F

    checking value in list

    Hi, I have two list. I need to check if value from one list is existing in second list. If not existing I should add on the end of the list the value. If exist I should in column B add "YES". Function X() Dim ws1 As Worksheet Dim ws2 As Worksheet Set ws1 =...
  9. L

    Pivot Table - Repeat Macro

    Hi, I have a pivot table that when I open it, it will open with a default date. I set the criteria for the dates that I would like to pull data from on 10 pivot tables on the same worksheet. What I would like is to have a macro that creates a pop up box and asks what date I would like...
  10. C

    Help with For function and FormulaR1C1

    Now I have a sheets with a first date and a last date of a period. In other sheet I need complete a series of dates by columns with their respective workdays on this period. I'm trying with For function and then using the formula "=Workday(RC[-1], 1)" like this: Sub Período()...

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