excel-vba

Text and Number Format on Excel

梦想与她 提交于 2020-01-05 07:46:20
问题 i have question that when i want to compare between a1= 1.3 b1= 3 and a2= 1.3 b2= 2 on excel for example =IF(a1>a2,"Yes",IF(a1=a2,IF(b1>b2,"Yes","No"),"no")) first time it's okay but then i changed value from b1 =1 it changed to "no" then i changed it back to b1= 3 it's still "no" i think it concern on format in the cell another concern is if i use like 1.3.1 compare to 1.3.1.2 it doesn't have any problem but when i use only 1.3 (one decimal point) it alway have problem it's hard to explain

Text and Number Format on Excel

我的未来我决定 提交于 2020-01-05 07:46:11
问题 i have question that when i want to compare between a1= 1.3 b1= 3 and a2= 1.3 b2= 2 on excel for example =IF(a1>a2,"Yes",IF(a1=a2,IF(b1>b2,"Yes","No"),"no")) first time it's okay but then i changed value from b1 =1 it changed to "no" then i changed it back to b1= 3 it's still "no" i think it concern on format in the cell another concern is if i use like 1.3.1 compare to 1.3.1.2 it doesn't have any problem but when i use only 1.3 (one decimal point) it alway have problem it's hard to explain

How to create complex dependent dropdown using VBA in Excel 2016? [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-05 07:44:14
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have the following data in a worksheet called Parts. In a different worksheet called Planning, I have the following data: In the above Planning Worksheet, Cell D3 is a dropdown that allow to choose a display language. The current choices are "English" and "Japanese". The A

Saving range as picture with Excel 2016

蹲街弑〆低调 提交于 2020-01-05 07:43:46
问题 The purpose of this code is to save a range of cells as a picture on the desktop. The file is created but does not contain any of the cell data, it is a blank image with the relative size of the range. The problem appears in Office 2016. Works in 2013. Sub SendSnapshot2() Dim strRng As Range Dim strPath As String Dim strFile As String Dim Cht As Chart Set strRng = ActiveWorkbook.Sheets("Snapshot").Range("A2:Q31") strPath = CreateObject("WScript.Shell").specialfolders("Desktop") strFile =

Excel VBA ByVal Target As Range Does not update Target Worksheet when excuting from a function cell

白昼怎懂夜的黑 提交于 2020-01-05 07:41:22
问题 I'm having a issues with copying a value from a cell that is using a function to get its value from another cell. Insert value into A1, A3=A1 and when ever the value of A3 changes the changes need to transfer automatically to column H. The issues i having is that if i type the value into A1 then A3 gets updated but the values do not transfer over, if i type the value into A3 then the H column does update. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = Range("A3")

How to write a modularized copy subroutine for cells in VBA?

China☆狼群 提交于 2020-01-05 07:38:33
问题 I need to be able to write a copy subroutine that will read in the input worksheet name and the input cells, and copy this data to a specific output sheet and output cells. This subroutine must be modularized because it will be used in mulitiple worksheets.It will only copy the data from input sheets to output sheets. Here is one I have written but it doesn't work. Public Sub Copy_Input_Data_To_Output_Data( _ ByVal pv_str_input_worksheet_name As String, _ ByVal pv_str_output_worksheet_name As

Excel Parsing multi-line Data column via macro with concatenated strings

笑着哭i 提交于 2020-01-05 07:29:48
问题 I have a excel column which runs in more than 20000 rows of data. Data format is almost consistent and requires parsing into newly inserted columns via macro. few parsing are straight forward and few require stacking and concatenated strings. Example of repetitive multi-line data in single cell LEGAL DETAILS FOR US5515106 Actual or expected expiration date=2014-05-26 Legal state=DEAD Status=EXPIRED Event publication date=1994-05-26 Event code=US/APP Event indicator=Pos Event type=Examination

Excel VBA - Scan range and delete empty rows [duplicate]

这一生的挚爱 提交于 2020-01-05 07:25:27
问题 This question already has answers here : Excel VBA - Delete empty rows (8 answers) Closed 4 years ago . I have a spreadsheet that populates rows based on data from a pivot table (imported through ODBC). I'm using VLOOKUP, for example: =VLOOKUP(A8;Data!B1:I298;2;FALSE) The result is something like Name1 Name2 Address1 Address2 Postalcode Country It might happen that some of the pivot columns are empty, resulting in Name1 0 Address1 0 Postalcode 0 What I need is some sort of function that loops

VBA, Avoid Overflow Error, Trim worksheet function

女生的网名这么多〃 提交于 2020-01-05 07:12:16
问题 I am getting an overflow error on my attempt to trim cells within my range. The line I get the error on is, C.Value = .Trim(C.Value) Perhaps this can be done without intersect? I've tried without it but it leads to mismatch error. Dim masterWB As Workbook Dim dailyWB As Workbook Dim C As Range Application.DisplayAlerts = False 'Set Current Workbook as Master Set masterWB = Application.ThisWorkbook 'Set some Workbook as the one you are copying from Set dailyWB = Workbooks.Open("excelguy.xlsm")

Macro with Match or If then copy into a new Tab

只谈情不闲聊 提交于 2020-01-05 06:55:48
问题 I have been stuck with a macro that I am building and I wonder if anyone can help me with it. The Macro: What it basically does, it pulls in into a the main workbook a number of excel files (tabs) with a huge range of raw data and then it consolidate the raw data pulled from all the Tabs imported into a new and standard dashboard tab used for monthly reporting. Each of the files imported come from a different desk located worldwide therefore each of them have a different format and the need