Hi Team,
I would like to ask for some help on the below please, hopefully it is clear from the description and example:
I have a field in my Oracle SQL table:
LOGIN_TIME - this is a result after calculating the ENDTIME minus STARTTIME fields - both are time stamp fields in the format...
Hey All!
I am running into an issue I can't figure out. I've got a big set of data and there is a specific column that I want to make a case statement based on the results.
If the field, lets call it A1, is...
=42
or =43
or is between 70 - 99, excluding 79 and 81
then I want to call it "Yes"...
Hello all,
Have a question that I thought I could easily answer but for whatever reason it doesn't seem to be working so another pair of eyes may help.
I have a For Each Cell in Range Statement that looks at a Doc Type (2 Digit Variable) and when it finds "KR" to Search a Offset Cell for...
I need to search column E for specific values and if that row has them then it will not delete the row
The problem is that I need to search it based on if it starts with something. So in the example below if cell E98 started with "AG____ " then that row would not be deleted
Dim iLastRow As...
Hi Guys,
Working on a piece of code and not getting the desired results. My code is looking in column C for a specific cell with text and giving me a row number, I am using the row number to dynamically set how many pages to make the worksheet print too (i.e small amount of data print to 1...
Hi! :)
I'm new to VBA and need some help changing this to a case statement. Thank you for your help!!! Cheryl
If ActiveSheet.Shapes("Check Box 110").ControlFormat.Value = 1 Then
Sheets("DHMO Copay").Columns("C").EntireColumn.Hidden = False
Else: Sheets("DHMO...
Hi All,
I have been struggling to get this working. I am trying to hide columns (C thru AA is the range) based on the value selected from the drop down in cell A12. The values are something like "Show All Details", "Show Financials", "Show KPI Results".... etc. For Example, i want to hide...
I have a spreadsheet that contains currency name in col A e.g. USD, AUD etc. Col B contains the amount that needs to be converted into GBP. The calculations will happen in the VBA code below and results stored in col C, D and E</SPAN>
Sub SoSo()</SPAN></SPAN>
Dim Rng As Range</SPAN></SPAN>
Dim...
I have the following code to change a cell's color based on certain conditions. I am comparing the values of two cells on the same worksheet. I have tried this with If Else If, seperate If statements and Case statements but cannot get it to work. Any clues would be appreciated and Happy...
Hi there
I have a CASE statement that is looping through a very large data set (>75,000 rows) and if the state says "New South Wales" i need it changed to NSW. I need this abbreviation for all Australian states. My code works but it is taking FOREVER to loop through all the data.
Can i convert...
I want to do a simple copy and paste from one tab of my workbook to another.
I created 24 named ranges (not efficient I know), 12 for the copies and 12 for the pastes, again all a part of 12 cases.
The copy is somewhat static, it will always be one row of cells, the reason I have it to be...
hi,
I have macro where I'm opening workbooks and for diffrent sheets I want to run code.
...
Set wb = Workbooks.Open(strPath2 & strFile2)
Dim myArray() As String
Dim myCount, NumShts As Integer
NumShts = wb.Worksheets.Count
ReDim myArray(1 To NumShts)
For myCount = 1...
Ok - I admit - I am adding two questions into one thread.:eeek:
First scenario:
In column G - I have different phases. I need to calucate how many dates it's been in that phase. It's an easy formula =networkdays(O2,Today(), Holidays A1:A10). O2 is the day that it moved into that phase...
Hi!
I'm using Excel 2010 (Windows 7) to develop a workbook with the goal of tying conditionally visible worksheets to a case statement. Conceptually, I want a user to enter a password and click on the enter password button, and have the sheets they are authorized to see appear in the tabs...
Hey so I just wanted to see what the opinions are on how I should tackle the probelm I am trying to solve.
Below is what my table looks like and I need to paste in a number to its corripsonding cell. The program should find out what the crop is (found on another worksheet) and then find out...
Hi there, will do my best to be brief:
I have the code below to loop through cells in column A and then place a result into column B based upon the value in column A. I also want the value of the cell to be put to Upper Case only for the purposes of comparison, i.e. I do not need it changed in...
I'm trying to write a function to test if a cell contains a website. So far I've got:
Function IsURL(text)
Dim test As Variant
Dim eml As Variant
eml = InStr(text, "@") 'if not present, position = 0
test = InStr(text, ".com")
If eml > 1 Then
IsURL = "email"
ElseIf test > 4 Then
IsURL =...
Hi,
I'm trying to delete sheets that have specific names or similar (e.g. delete "Sheet1" and "Sheet1 (2)") I am using the following code:
For Each ws In Worksheets
Select Case ws.Name
Case "Remaining*", _
"No_Break*", _
"Listed_Instruments*", _...
I have run across some code that uses Case Statements, based upon a user's Button Selection from a UserForm. This is located in the UserForm Event Module.
I thought this would be straight forward to have it call a Sub "WriteToLog," if the Case Statement is true. However, it's not working for...
Hello,
Very new to VBA. Working off a code that hides worksheets until a password given to open them.
I want to modify this so that it will open more than one sheet...
What I have:
Option Compare Text
Const pWord2 = "XXX"
Sub showsheets2()
Select Case InputBox("Enter Raw Data...
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.