excel

Copy and Paste (transposed & values) a set range in a different sheet in the next empty row

只谈情不闲聊 提交于 2021-01-29 02:48:11
问题 I have some data in range P1:R13 on a sheet called Training Analysis. I want to copy and paste these data on a second sheet called Foglio1. I want it to be just values . I need these data to be pasted in a range A2:M4 , in other words I want it to be transposed. I got the following code and it is working. But now, when I get new data I need to paste them under those I already have. Sub add() Dim lastrow As Long lastrow = Sheets("Foglio1").Range("A65536").End(xlUp).Row ' or + 1 Range("P1:R13")

Finding rows with multiple values in the columns

三世轮回 提交于 2021-01-29 02:45:44
问题 I am attempting to find a way to search rows and find out which ones have multiple values in the rows. For example If I have this: 81 IRENE L MOTZ 82 BRITTNEY SUMMERVILLE 83 NICK SIRK 33 120 1,859 86 DOROTHY TARR 32 87 DAVID BRYANT 89 WAYNEDALE VAULT 90 APRIL HOWARD 95 DONA KAHL 96 ASHLEY FISHER 98 TERRI SULESKI 99 SCOTTSVILLE VAULT 104 CHRISTINE WIECHART 564 105 KAYLENE DUNCAN 7 106 LINDA NETHERTON 107 DIANNA MAY 336 108 DIXIE HETTINGER 596 110 JIM MELVIN 26 111 LASHAWNYA BREWER 181 112 LOIS

How to use time format excel cell in laravel uploaded excel?

一个人想着一个人 提交于 2021-01-29 02:45:36
问题 i am using laravel package maatwebsite/excel version 3.1 for excel file upload. $collection = Excel::toCollection(new UsersImport, storage_path('app/' . $newFile)); i have uploaded a file where the format of cell is time. Here time in and time out cell has time format. when i upload this file the resulting output is: in resulting output time in and time out cells data is converted into string. how to prevent this from converting or how to change this from text to time? 回答1: You need to

How to insert 'n' number of rows based on 'n' being a number in a cell

青春壹個敷衍的年華 提交于 2021-01-29 02:31:05
问题 I have a list of companies in column a. In column b, I have a number. I need to create a list where the company appears as many times in the list as the value of the number: Company A 4 Company B 2 Company C 3 I want: Company A Company A Company A Company A Company B Company B Company C Company C Company C So, it's sort of a 'Create (n) Duplicates' function. 回答1: Give this a try: Sub KopyKat() Dim N As Long, i As Long, K As Long Dim v As String, kk As Long, m As Long N = Cells(Rows.Count, "B"

Export SAP Data won't open workbook while running

六月ゝ 毕业季﹏ 提交于 2021-01-29 02:20:31
问题 I wrote a code to export data from SAP to an Excel workbook. To do that I open the transaction (IW28 in this case), export the file and save it to a specified location. When the file is opened, I want to copy the data from the exported sheet to my own sheet. The problem is that the exported sheet won't open while I'm running the macro. When I add a breakpoint in my code, the exported sheet opens when the macro stops. Without this breakpoint the exported sheets only opens after the macro had

Using Word VBA to automate Excel, I get Run-time error '13': Type mismatch when using the .Find function

蓝咒 提交于 2021-01-29 02:16:11
问题 I'm trying to get data from an excel sheet to a word document. I try using the 'Find' function however I keep getting the same error "Type mismatch" on this line: Set FoundRange = .Cells.Find(260707) Here is the subroutine I am running. Sub GetID() Dim oXL As Object Dim oWB As Object Dim oSheet As Object Dim WorkbookToWorkOn As String Dim FoundRange As Range Dim dummyvar As String 'Start a new instance of Excel Set oXL = CreateObject("Excel.Application") 'Line to make Excel Visible or not oXL

Using Word VBA to automate Excel, I get Run-time error '13': Type mismatch when using the .Find function

跟風遠走 提交于 2021-01-29 02:13:46
问题 I'm trying to get data from an excel sheet to a word document. I try using the 'Find' function however I keep getting the same error "Type mismatch" on this line: Set FoundRange = .Cells.Find(260707) Here is the subroutine I am running. Sub GetID() Dim oXL As Object Dim oWB As Object Dim oSheet As Object Dim WorkbookToWorkOn As String Dim FoundRange As Range Dim dummyvar As String 'Start a new instance of Excel Set oXL = CreateObject("Excel.Application") 'Line to make Excel Visible or not oXL

Export SAP Data won't open workbook while running

喜夏-厌秋 提交于 2021-01-29 02:13:09
问题 I wrote a code to export data from SAP to an Excel workbook. To do that I open the transaction (IW28 in this case), export the file and save it to a specified location. When the file is opened, I want to copy the data from the exported sheet to my own sheet. The problem is that the exported sheet won't open while I'm running the macro. When I add a breakpoint in my code, the exported sheet opens when the macro stops. Without this breakpoint the exported sheets only opens after the macro had

Delay VBA code operations without freezing Excel

﹥>﹥吖頭↗ 提交于 2021-01-29 02:10:15
问题 I am writing a VBA macro that will simply open another workbook, refresh all, save, and then close. It will repeat this with a second workbook. Then it refreshes and save the main workbook that the VBA code was run from. The problem I am facing is that the two workbooks being opened are using Microsoft queries to pull data from our JobBoss database and it is set to refresh this data upon opening the file. So the file opens, starts refreshing the query data and then the VBA code tries to

Delay VBA code operations without freezing Excel

萝らか妹 提交于 2021-01-29 02:03:32
问题 I am writing a VBA macro that will simply open another workbook, refresh all, save, and then close. It will repeat this with a second workbook. Then it refreshes and save the main workbook that the VBA code was run from. The problem I am facing is that the two workbooks being opened are using Microsoft queries to pull data from our JobBoss database and it is set to refresh this data upon opening the file. So the file opens, starts refreshing the query data and then the VBA code tries to