excel-2010

pull data from website using VBA excel multiple classname

随声附和 提交于 2019-12-18 02:58:08
问题 I know this has been asked many times, but haven't seen a clear answer for looping thru a div and findind tags with the same classname. My first question: If I have something like this: <div id="carousel"> <div id="images"> <div class="imageElement"> <img src="img/image1.jpg"> </div> <div class="imageElement"> <img src="img/image2.jpg"> </div> <div class="imageElement"> <img src="img/image3.jpg"> </div> </div> </div> So I want to get all the img Src in the div "images" along with other stuff

Looping through all rows in a table column, Excel-VBA

我的未来我决定 提交于 2019-12-18 02:42:49
问题 I'm currently working on a data set which is formatted as a table, with headers. What I need to do is cycle through all cells in a specific column and change the contents. Through research on MSDN I came up with the following for loop for i = 1 to NumRows Cells(i,23).Value = "PHEV" next i So this would change all the cells in column 23 to read "PHEV". However, I do not build the table I'm working with myself, so I can't guarantee that the column I'm interested in will be column 23. I'd like

Cells reference not working in Excel VBA 2010 Function

℡╲_俬逩灬. 提交于 2019-12-17 20:59:33
问题 I am attempting to write a function that takes a range of data and calculates the ratio of two numbers from the columns provided by the user. I want to print this ratio out at the end of the row, but for some reason I am not able to reference the last cell in the row using the cells function. Instead, the Cells function just keeps providing me the value of that cell and not the cell address. I thought that the cells function provides the address as well. Can someone tell me if this wrong or

How to use powershell to copy several excel worksheets and make a new one?

空扰寡人 提交于 2019-12-17 19:29:21
问题 I have about 70 excel files I want to combine into a single document. Each document has only one sheet and follows this format: Row A with Columns A-F of headings Row B with the first entry Row C with the second entry Up to 150 rows on some sheets I want to scrape the information from Columns A-F for each row, and combine it into a new file with the information from all of the other files I have in the same directory. Note: I only want to capture Columns A-F since in Column G there exists a

Excel VBA Find last row in range

放肆的年华 提交于 2019-12-17 17:03:47
问题 im having a little trouble with finding the last row. What i am trying to do is find the last row in column "A", then use that to find the last row within a range. Example of Data: 1) LR_wbSelect = wbshtSelect.cells(Rows.count, "A").End(xlUp).Row - 22 2) LR_wbSelectNew = wbshtSelect.cells(LR_wbSelect, "A").End(xlUp).Row I am using the last row in column "A" as the data from row 29 down will always be the same length, the rows used in column "B" from row 29 can be a varying number of rows. So

Removing special characters VBA Excel

一个人想着一个人 提交于 2019-12-17 12:19:23
问题 I'm using VBA to read some TITLES and then copy that information to a powerpoint presentation. My Problem is, that the TITLES have special characters, but Image files that I am also coping over do not. The TITLE forms part of a path to load a JPEG into a picture container. E.g. "P k.jpg", but the title is called "p.k". I want to be able to ignore the special characters in the TITLE and just get it to see a space instead so it picks up the right JPG file. Is that possible? Thank you! 回答1: What

VBScript - How to make program wait until process has finished?

久未见 提交于 2019-12-17 10:05:23
问题 I have a problem in a VBScript that I am using with a VBA/Excel macro and a HTA. The problem is just the VBScript, I have the other two components, i.e. the VBA macro and HTA front-end working perfectly. But before I explain the problem, I think for you to help me I must help you understand the context of the VBScript. So, basically all components (VBScript, VBA macro and HTA) are parts of a tool that I am building to automate some manual chores. It pretty much goes like this: A - HTA ~~~~~~~

Excel error 1004 “Unable to get … property of WorksheetFunction class” appearing inconsistently

倾然丶 夕夏残阳落幕 提交于 2019-12-17 07:40:04
问题 I have a VBA function within a spreadsheet which operates on another spreadsheet that is opened in an earlier stage of my macro. The macro used to work fine but just recently has started causing a 1004 error ( "Unable to get RoundDown property of the WorksheetFunction class" ) when it runs. I believe I understand what the error would be caused by (a problem running RoundDown) but I cannot see why it is getting triggered in my macro and the odd part is that when I go into Debug mode and step

Cannot VBA write data to cells in Excel 2007/2010 within a function

余生长醉 提交于 2019-12-17 07:39:35
问题 I want to set value for cells by VBA. I have googled, and see some resolution: Sheets("SheetName").Range("A1").value = someValue Sheets("SheetName").Cells(1,1).value = someValue With this kind of code, I can just read data from cell A1 but I cannot set a new value to it. Update The code to set cell A1 value is put within a Function as below. Function abb() Sheets("SheetName").Range("A1").value = 122333 abb = 'any thing' End Function In cell B2, I set =abb() and hit enter. I get #VALUE but

Cannot VBA write data to cells in Excel 2007/2010 within a function

时间秒杀一切 提交于 2019-12-17 07:39:20
问题 I want to set value for cells by VBA. I have googled, and see some resolution: Sheets("SheetName").Range("A1").value = someValue Sheets("SheetName").Cells(1,1).value = someValue With this kind of code, I can just read data from cell A1 but I cannot set a new value to it. Update The code to set cell A1 value is put within a Function as below. Function abb() Sheets("SheetName").Range("A1").value = 122333 abb = 'any thing' End Function In cell B2, I set =abb() and hit enter. I get #VALUE but