vba & conditions

  1. S

    VBA: All combinations that sum between two numbers - too much processing blows up

    Hi, Thanks much in advance for reading. It's really not an overly confusing concept, and I've tried to lay it out as simply as possible! I have some VBA code (not my own) that successfully returns combination sums between a defined range. A quick summary of what that even means, then my issue...
  2. Engineer Joe

    Problem looping through sheets via vba

    For Each sht In ThisWorkbook.Sheets If sht.Name Like "DHU - *" Then sht.Visible = xlSheetVisible End If Next sht I've got this code that keeps erroring out on mismatch 13. I'm not sure what's causing it. It gets through the loop like 8 times and then says that...
  3. U

    VBA: Binary VlookUp against XLSX or XLS

    Hello Gurus, I have a Binary excel file and want to update a particular column using the unique identifier from an xlsx or xls (get open file) . Do you think it is feasible? Example Binary Sheet: Number Name Country Note 001 Mark Finland Checked 002 Sean United States Example...
  4. A

    Possibility of having an If condition result linked to a cell color VBA

    Hello, I was wondering if there is it possible to Link an IF condition with a cell color instead of a specific data using VBA. For example: A range of cells B4:B20 have data lets say numbers. some of those cells will change color to blue. for the sake of the example lets say B7 changed color...
  5. K

    I was make Print to PDF With Duplex page , its Work , But How to set (Top, bottom, Left, Right Margin) in this VBA code....

    I was make Print to PDF With Duplex page , its Work , But How to set (Top, bottom, Left, Right Margin) in this VBA code.... i was Create MODULE and put this VBA code , So Amazing Trick to ,make Print TO PDF with Duplex (Both-side),,,,, Kindly Provide set VBA code For both page Margin...
  6. I

    Vba code to keep web page active

    I'm working on a web page where data from excel sheet gets copied, now the problem which I get is when my code click on submit, a new page loads with different url.. and my codes next line don't work, to look out elements to fill the data... How to code in such a way that my code keep on working...
  7. T

    VBA to test if ActiveCell is in a specific column of a ListObject table before performing an action

    I'm trying to create a test before allowing a DoubleClick function to ensure that the DoubleClick only occurs in a particular column (the first column) of a table ("Table9"), before copying the contents of the ActiveCell that was clicked to a cell (C4) on a different worksheet. The code below...
  8. H

    How to calculate number of rows containing any colored cells?

    I am wondering if there is a VBA/macro that I can run to count the number of rows in my table that contain any colored cells? My research seems to only turn up code for counting colored cells, but I need to count the entire row as 1, regardless of how many or what color cells are contained...
  9. V

    Need help on VBA code

    i had 5 different users workbook (Each workbook contains 2 sheets, sheet1(CU), Sheet 2(Source)) in documents folder. Sheet1 (CU) consist of 5 columns which are Date, Start time, End time, User Name and Remarks starting from column A to E. And i had 1 consolidated Workbook with 2...
  10. U

    VBA: Copy and Paste to Different Tab

    Hello Gurus, Hope all is well. I have two tabs namely Excel 1 and Excel 2. Excel 1 contains the data and I need to filter it to Copy+Paste in the Excel 2 tab based on the following criteria. Copy and paste whole row if contains these: 1. Column B = Look for "Math" 2. Column C = Look for "UK"...
  11. A

    Copy Data from One sheet to another based on the condition column

    Hi, I need help, please. I saw a few options but nothing worked so far. My problem is this: I work with two sheets on the same file, "RawData" and "FinalData" RawData is summarized data from PowerBI and it varies in the number of rows. I added a column on that sheet with a condition, with Copy...
  12. J

    Text File to Excel Worksheet

    Hello, I have searched through the existing threads that pertain to things like this and so far, I have not been able to find a solution. I have this text file that I need to get specific data from and load it into excel; the first line of each data chunk is the part that I am looking for...
  13. C

    How to create a macro that copy pastes a fix range into another sheet and takes into consideration a cell value

    Hello! I'm pulling from Yahoo Finance the historical stock prices. You can only get with Power Query 100 lines. I have downloaded the history in one sheet and I have the Power Query with the last 100 days in another sheet. I would like to have a macro that pastes the new values into the history...
  14. A

    excel 2016, How to apply like, to search and exclude for email addresses, in a URN filter?

    hi I need to search sender e-mail address excluding microsoft and no-reply@notify.aol.com for a date. This code work for microsoft only. Filter = "@SQL= (NOT urn:schemas:httpmail:fromemail like '%microsoft%'" & _ " And urn:schemas:httpmail:datereceived = " & daterec& "))" But when...
  15. S

    Autofilter Table Based on Range of Values from a Different Sheet

    Hello seeking help for a code I've gathered. So the code below works well if the criteria are on the same sheet as the table. But I'm trying to figure out how the below code works if the criteria are on the different sheet. The Criteria: 10/8/2022, 10/9/2022, 10/10/2022 Code: Sub Test () Dim...
  16. Y

    VBA: Calculating the value at every row, but formula changes depending on the value in one column

    I would like to create a simple formula to calculate the net change on a certain row, and print it in the same row (column H). But what I plug into the formula will depend on the value at each row's column A. This is the code that I tried: Sub totalPnL() Dim LR As Long LR = Range("D"...
  17. U

    VBA: Code to skip or ignore rule If Cell data is not Identical

    Hi Gurus, Good day! I just wanted to ask for your insight as I found a code to merge accounts, however if the cell data is not the same, it will skip the code. Example: No Name Data 1 Data 2 001 Math 100 95 002 Math 100 95 003 Science 95 90 'VBA Code for Merging the Data 1 and...
  18. F

    VBA - Loop thru columns

    Hi All, I´m working in a spreadsheet where: Column B - Customer Name Column C - Status Column D to O - months of the year ( sum of amount spent by each customer by month) Columns P - Sum of total year expenditure Cell S1 --> Its a drop down list - containing all 12 months ( in the example its...
  19. N

    Data entered into userform is not calculating Type mismatch?

    Hello wonderful excel people, I am having an issue that has me stumped that I was hoping to get some help on, please. I have a userfrom with a few text boxes for text and services/products to be written and then another 12 textboxes (tb_sprice1 - tb_sprice12), where I'm able to type prices...
  20. montecarlo2012

    vba - permutations

    Hello. Sub ListPermut() 'This macro creates a list of all permutations 'Define variables Dim ws As Worksheet, Ans As String, ans1() As String, digits As Integer Dim num As Integer, p As Long, i As Long, t As Long Dim rng() As Long, c As Long, rng1() As String 'Ask for user input Ans =...

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