I am trying to use a variable to determine how many times to go thru a loop. The code that I am trying to get to work is shown below. If I use 'For S1 = 1 to 2", I go inside my loop 2 times. If I use 'For S1 = 1 to NumofTimes', I do not get inside my loop.
The Msgboxes show a value of 1 and a...
Dear All,
I am writing a macro where i have multiple conditions for getting the data and i am stuck here as it is giving only single output that is "0-1 days"... Please help
below is my code :
Lastrow1 = Sheets("Rawdata").Range("A" & Rows.Count).End(xlUp).Row
For A = 2 To Lastrow1...
Hello,
I am writing a program that combines and compares the values in columns 1 and 2 using an array, then changes the color of the row those values appear it if it show up more than once in the spreadsheet. I know there is an easier way to do this with formulas, but the person I am making...
Hello guys!
I have a current project where i am trying to get a macro to set E to A depending on whether or not the value in the previous row is a date. If it is i want it to simply copy down. But if the value before isnt a date i want it to change to copy and pasting the text value . Right...
Hello All,
I have a independent combobox and a dependent combobox, the dependent combobox depends on the information provided in the first independent combobox.
I know there is the select case to make fill the dependent combobox. Here is a brief overview what my code does.
I have two...
Hi everyone,
I can't figure out how to make my simple for loop code show an error message when it no longer finds any cell(s) that meet the criteria. The criteria is that the first cell must match "K1110" while 4 cells to it's right must be blank. Please note that this code works fine. But...
I've searched several forums over the last few days and have been unable to find exactly what I'm trying to do. Apologies if I missed it somewhere in this forum.
Currently, I have a functioning macro that will autofilter each worksheet for the specified values from the main "input" worksheet...
Hi,
I need to reference a cell in Column A and B on the Active row for a conditional formatting command and am having trouble.
It isn't the most glorious bit of code but it works with the exception that its hard coded to reference A2 and B2. Rather I need A and ActiveCell.row or...
FolderLoc = FolderLoc & "" & "Jan" & ". " & Year 'Inside the Folderloc there are ten's of file and each and every files has atleast three more files in it.
Set FSobj = CreateObject("Scripting.FileSystemObject")
Set ProjectsFolderObj = FSobj.GetFolder(FolderLoc)
For Each BCFolderObj In...
Hello,
I have a worksheet that's split into groups of data with a heading at the top of each. For instance, row 3 has a heading, then 4-9 have data that goes with it, then row 10 has another heading, and so on. Some of the rows of data are hidden using VBA based on certain values, leaving the...
How do you do Friends,
I have a large data set and I would like to search for a keyword and update the cell 5 columns over from it.
This is what I have so far:
Sub Find_and_Write()
Dim X As Variant, F As Range
X = Application.InputBox("Enter Value")
If TypeName(X) = "Boolean" Then Exit Sub...
OK, so I have my own code but it's causing lots of issues so I think I should start from scratch.
Basically, what I need is a For Loop that cycles through all visible worksheets, filters each table on 3 criteria, then copies any results onto a summary sheet.
It should NOT copy the header rows...
How to transform the code below into VBA Code (or another method)?
IF(COUNTIF(Data!$1:$1,A2)=0,0,COUNTIF(Data!$1:$1,B1))+
IF(COUNTIF(Data!$2:$2,A2)=0,0,COUNTIF(Data!$2:$2,B1))+
IF(COUNTIF(Data!$3:$3,A2)=0,0,COUNTIF(Data!$3:$3,B1))+
.
.
...
Hi, Bros.
I am having trouble coming up with a formula and was wondering if I could get some assistance/advice.
I have 2 sheets, "Data" and "Sheet1".
The sheet "Data" have 100000 rows with data from column B to column H.
<colgroup><col><col span="7"></colgroup><tbody>
ID1
1
1
8
2
3
2
0...
In part of some code I'm working on, I'm trying to find the cell containing the first day of the previous month, then hiding everything from column U up to that column.
I've attempted a number of different methods, but nothing I've tried seems to work - it doesn't give an error, just skips...
I can't figure this out for the life of me. If I was to run For j = 3 to 3 everything runs perfectly. When I run the loop For j = 0 to finalrowcust -1 it adds all kinds of stuff. I've tried to run a For k = 0 to finalrowcust -1 then For j = k to k, but that didn't work. I've also tried...
Hello,
I am new to VBA and have run into an issue with an array formula over 255 characters. The array formulas are different for each cell and are already present in each cell, so I would like to loop through a range, increment a number by 1, and then apply the cntrl+shift+enter to each cell...
Good Morning Everyone!
I'm about 4 months into learning VBA so I'm still a beginner. I am trying to write a code and I'll do my best to explain what I'm trying to do. I have a worksheet with multiple columns of financial data going down the columns (In this case columns C,E,G,I,K....). Next to...
Hello,
I have a workbook with departments and some of these departments have a grand total without the grand total. The table looks like this...
<tbody>
Department 58 Aqua Rec all unitspools
ACCOUNT#: 1-026-58-00000-3343
MEMBER NUMBER
MEMBER NAME
TRN DATE
0 -30 DAYS
31-60 DAYS...
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.