Hello, I am trying to get the following to work, if does not error , just returns blank cell rather than 0 or 1, can someone tell me where i am going wrong please.
Dim lastrowcolumnA As Long
lastrowcolumnA = Range("a" & Rows.Count).End(xlUp).row
For i = 2 To lastrowcolumnA
If Cells(i, 14) >= 2...
Hi,
I've been using VBA to add the text ''Waxcap'' to a cell where the If function meets the conditions of a certain set of values being found in cells of the same row in a different column.
This is my code when conditions are met:
Then Cells(i, designations).Value = "Waxcap; " & Cells(i...
I have this code supplied by a board regular and it works perfectly apart from one minor bug.
I have a table being used for our production schedule with the date as the main focal point. This table is updated regularly throughout each day and items are both removed and added. The code is...
I have the below program for delete row if specific value content in column . but it getting too much time for running .
I want to run the same program but take less time.
Also help me for the run that program for different sheet (Sheet2)
Sub DeleteRowContents()
last =...
Greetings
I have a coloring in issue:
I have a sheet, and in column A there are JobIDs with same grouped number A1=1, A2=1, A3=1, A4=3 ,A5=3 ,A6=3.
I currently have this: which color codes the batches correctly.
Issue 1: It works for 56 lines and dies probably because I'm using cindex. It...
Trying to find the text "XLD XLD" and format row accordingly, not having much luck, appreciate the assistance.
Dim i As Long
For i = Lastrow To 1 Step -1
If Cells(i, 1) = “XLD” Then '‘ You can change this text
Range(Cells(i, 2), Cells(i, 5)).FontStyle = "Bold"...
Hi , guys I've got the code below, but I can't figure out where the compile error is. I thought I have covered all Do's with Loops.
Sub revampedloop()
Application.ScreenUpdating = False
Application.DisplayStatusBar = False
Dim i As Integer
Dim j As Integer
Dim a As...
I found some code and with a slight modification I'm not getting the right results.
I have workbook names in A1:A8 in my master workbook. If the workbook with the name in A1:A8 is open, I would like B1:B8 to show the corresponding "Open" or "Closed".
Any thoughts on how to achieve this?
Sub...
i'm having trouble with Json.count,,, heres my sub:
Sub chart()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
If Worksheets("chart").ChartObjects.Count > 0 Then
Worksheets("chart").ChartObjects.Delete
End If
Dim wb As Workbook
Dim ws As Worksheet
Dim...
Hi guys,
im new here and have a question.
I have a table with 14 colums. In colum D are costumer numbers. I want to check with a VBA if a costumer number inside more than one time.
In colum C are order quantities. If the costume numer dublicate i want to sum all of the order quantities from...
Hi,
Thank you, in advance, for any contributions to this code.
The code below isn't formatting. Essentially, what I need this code to do is start in column "D", row 3, and search for dates, highlighting any date that is within -4 to +2 days of a date listed in A1. I want this to then jump to...
Hi guys! I've been recently getting into coding VBA, and am still relatively new to it (about 2 weeks in). I'm currently trying to use the following formula in vba as an array formula, but I get an error message " Unable to set the FormulaArray property of the range class". I've tried breaking...
If Cells(i, 2).Value = "n" Then
If Right(Cells(i, 1).Value, 2) = "sh" Or "ch" Then 'TYPE MISMATCH?
Cells(i, 3).Value = Cells(i, 1).Value & "es"
It shows an error message of "Type Mismatch" could you help me what am i doing wrong? Have a nice day!
Hi All,
For a project I need to sort two lists of genes with each other. I found a script online that now works for my data set, but I have an issue with the header. I have added an extra header row, that now is continuously sorted with my data list. Does anyone have a suggestion?
The code...
Hi All,
I have a workbook consisting of 6 worksheets (all with data referring to that location). I have a macro in place to loop through all the worksheets and look for the projects that are "closed" , it then cuts the rows based on the condition and transfers it to a worksheet called closed...
Hi there, the following code almost works, however it does not remove the middle range as desired, any suggestions!
"B" & i works ok
"O" & i works ok
"L" & i DOES NOT WORK
Dim i As Long
For i = Lastrow To 3 Step -1
If Cells(i, 1).Value > 0 Then
Range("B" & i & ",L" & i & ",O" &...
I have this macro that works on the first sheet (activesheet) that I would like to work on sheets 1 and 2 the same. Could you please help advise the best way to accomplish this?
Option Explicit
Dim cXref As Collection
Dim rSource As Range
Dim stDestination As String
Dim wDestination As...
Good morning all,
New member here. My job involves cleansing a data set before it's provided to a client. The data is pulled from our system through SQL report, into a spreadsheet.
I've kind of fallen into this role: I'm a lawyer, but someone needs to do this to keep the client happy, and I'm...
For i = 9 To LastRow
If UCase(Cells(i, "F")) <> "CL" Or UCase(Cells(i, "F")) <> "CLOSED" _
And Cells(i, "B").Value = 100 Then
Cells(i, "B").Value = 99 _
And Cells(i, "E").Formula = "=(E-.3)"
End If
Next i
Hello All...
I have a little problem here.
What I'm trying to accomplish, is for the...
Hello All,
I am using the below script to highlight values of cells in a specific column when they contain #N/A. I recieve an error called "Type Mismatch" on the highlighted line below (in Red).
Sub highlightValues()
Sub highlightValues()
Dim ws As Worksheet
Dim i As Long
Dim lastrow As...
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.