Execution macor excel (1004) vba

When I try to run the following macro through a button that I drew on my workbook I get the an error (1004). The macro looks like this: Sub copy_data() ‘ Copy incident_id and ticket_id from raw_incidents Sheets(“Raw_Incidents”).Select Range(“Raw_incident[[id]:[ticket_id]]”).Select Selection.Copy Sheets(“Report”).Select Range(“Report[[incident_id]:[ticket_id]]”).Select ActiveSheet.Paste ‘ Copy ticket_id from raw_old_ticket_support Sheets(“Raw_Old_Support_Tickets”).Select Range(“A5”).Select Range(Selection, Selection.End(xlDown)).Select Application.CutCopyMode = False […]

Convert Java date to Excel date results in one more day than actual, before March 1, 1900

I am using POI to export some data into an Excel file. I have some code to insert some date into Excel sheet cell as date (rather than text). I works fine for dates after 01/03/1900. However for dates before that, it results a dates one more day than actual day. //SOME CODE final HSSFDataFormat […]

Get the Last String value of n length after a delimiter from string using excel formula

I need to get the last split value from the cell. The input cell C1 value = main\java\com\tms\vsc\ppo\data\domain\Ppo.java which must be copied to another cell B1 Expected output in B1 is Ppo.java Below is the formula tried over in cell B1 =RIGHT(RIGHT(C1,FIND(“\”,C1)),256) and =RIGHT(C1,FIND(“\”,C1)) Can anyone help me out. Its a pure excel and not […]

Table of name ranges in Excel

I have a column called Mode having different values (Air, Surface etc.) In the below formula I am using Named Range with the same name as Mode (Air, Air_r, Air_c, Surface, Surface_c,etc.). =IF([@Mode]=”AIR”,CONCATENATE(LEFT(RIGHT(CELL(“address”,INDEX(AIR,MATCH(IF([@[Charged Weight]]>0.5,0.51,[@[Charged Weight]]),air_r,1),MATCH([@Zone],air_c,0),1)),3),1),RIGHT(CELL(“address”,INDEX(AIR,MATCH(IF([@[Charged Weight]]>0.5,0.51,[@[Charged Weight]]),air_r,0),MATCH([@Zone],air_c,0),1)),1)),0) How can the Index Array & rows & columns be changed dynamically with reference to value in Mode […]

vba select values in listview and show in textbox

I want to display the value of 3rd column instead of 1st column. Pleae advise as to whan changed is required. Dim blnFoundFirstItem As Boolean blnFoundFirstItem = False Dim i As Integer For i = 1 To ListView16.ListItems.Count If (ListView16.ListItems(i).Selected) Then If (Not blnFoundFirstItem) Then TextBox118.Text = ListView16.ListItems(i).Text blnFoundFirstItem = True Else TextBox118.Text = ListView16.ListItems(i).Text […]

Excel VBA – Simple 'Delete row if value not equal' takes forever to run

Hello I have this code to compare the date of some data row to the benchmark date, and delete the row if they are not equal. It works fine but takes forever (like 5 seconds per row to execute) to run. I just can’t figure out why. Sub Remove2() Dim LR As Long, i As […]

How to compare 1 column in excel with other columns and give statistic (percentage) of how many match?

How to compare 1 column in excel with other columns and give statistic (percentage) of how many match? For example I need to compare Columnn A with Column B, C, D, E, F. I will need to see statistic of Column A compared with each other column individually and also with all the other columns […]

Formula to check if one cell is within a range between two cells from a list

Say I have the value in D2. I want to see if that value is within the ranges B2-C2, B3-C3, B4-C4 and B5-C5. If it is, I want to find a function that returns the text from A2:A5 where the value fits within the ranges. I would then use these values in a future function. […]

excel, without script, just using its built in features, how to trigger a value or content in one cell based on value or content in other cell

Need advice on the following; Thanks in advance.: Excel, the visual description of the issue Further description of the issue: certain Product code = certain Product name of certain Size. The help-table on the attached image shows that a certain product code = what product name of what size, as a guide. This is what […]

Excel/Categorization Macro(formula) based on string of text containing keywords

Now I spent a few days searching up and down and need to find a solution. I saw two threads but both are not what I am looking for exactly and I admit, being not too good in VBA, I cant make heads or tales. What I have: I have 4300 lines of Bank statements. […]

MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.