excel-2013

Add comments to cells using VBA

本秂侑毒 提交于 2019-12-11 01:08:10
问题 Is there a way to activate a comment on a cell by hovering over it? I have a range of cells that I would like to pull respective comments from another sheet when hovered over each individual cell. The hover event would pull the comments from their respective cells in the other sheet. The comments are of string value. Basically, I have a range of cells in Sheet 1, let's say A1:A5 and I need comments to pop-up when I hover over them and pull from Sheet 2 range B1:B5. The reason why I won't do

Dynamic ranges again - once more, with text strings

回眸只為那壹抹淺笑 提交于 2019-12-11 01:04:27
问题 I have a series of data sets (later to be used for populating comboboxes), and I've tried setting up dynamic ranges to list only the cells with useful data. In total, there are 160 rows of data, but the number of rows that will be populated will vary wildly. In case it has a bearing on it (if the dynamic ranges detect "" as not blank, for example), the formula used to populate the cells in the range is {=IF(ROW()-ROW(StartPort_NoBlanks)+1>ROWS(StartPort_Blanks)-COUNTBLANK(StartPort_Blanks),""

Conditional Formatting of maximum value in each row of many

天大地大妈咪最大 提交于 2019-12-10 13:23:55
问题 I have a spreadsheet with 250+ rows of data and need to find the largest value in each row. I tried to use Conditional Formatting, however I need the same rule for each row so can't highlight all the data, and trying to copy and paste it would be too cumbersome. Is there a faster way of applying the same rule to each row separately? 回答1: Please select he relevant columns (say A:H) and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and

Find the last not empty row in a range of cells holding a formula

我只是一个虾纸丫 提交于 2019-12-10 12:45:24
问题 How can I find the last row in a range of cells that hold a formula, where the result of the formula is an actual value and not empty? Say in a simplified way that the range of cells ("E1:E10") hold a formula referring to cells A1 through A10 as followed =IF("A1"="","","A1") . But only the cells A1 through A6 have a value filled in, so the result of the formula for cells E7 through E10 will be empty. Trying to do it with: lastRow = ActiveSheet.Range("E" & Rows.Count).End(xlUp).Row results in

Excel 2013 Forumla Not Working in some Cells

陌路散爱 提交于 2019-12-08 13:02:06
问题 SO I'm trying to get some work done in Excel 2013, and after getting an initial formula to work, I dragged it across several other cells. I did all the standard locking of references and such, even copied the exact formula into the new cell formula window with copy paste. The formula works in the first cell, not in those it's dragged over. It also works in seemingly random cells when pasted around (see screen shot). Formula is below... this was a brand new sheet, the cells had not been

VBA pasteFormats activating the destination worksheet

柔情痞子 提交于 2019-12-08 12:39:21
问题 I have a problem with pasting columns Set SourceWBsht = Thisworkbook.Worksheets("Source") Set DestinationWBsht= Thisworkbook.Worksheets("Destination") SourceWBsht.Range("A1:Z40").EntireColumn.Copy DestinationWBsht.Range("A1:Z40").EntireColumn.PasteSpecial _ Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False SourceWBsht.Range("A1:Z40").EntireRow.Copy DestinationWBsht.Range("A1:Z40").EntireRow.PasteSpecial _ Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False,

Excel 2013 pivot hierarchical, nonnumerical data

时间秒杀一切 提交于 2019-12-08 09:23:00
问题 I have hierarchical data like this Country Region Category ProgramName USA North SchoolName A USA North SchoolName B USA South SchoolName C Brasil East SchoolName D Brasil East CollegeName E Brasil West CollegeName F I would like to pivot it into a user readable format. I am able to build the pivot table, however I would like to use nonnumeric data as the pivot. The VBA code in this answer seems promising but it can only pivot a single nonhierarchical column. How can I achieve my goal? 回答1: I

Use string variable to set object variable in VBA? (Excel 2013)

∥☆過路亽.° 提交于 2019-12-08 03:06:33
问题 I have a number of ActiveX controls/buttons on a page, and I would like to modify several of the parameters of the buttons (in a loop function). I am fine with writing the loop function to achieve this, but cannot find a way to refer to the object using a string variable. I have set up an object variable (as per below), and a string variable to be used to change the reference for the object variable - but can't find a way to get it to work. This is the code that does NOT work: Private Sub

import multiple text files to seperate sheets in the existing workbook

半世苍凉 提交于 2019-12-07 23:20:25
问题 I have an excel file (2013) (eg test.xlsm ). The excel file contains sheets with graphs and pivot tables which are refreshed monthly, based on text files. I need a VBA code which can import multiple text files from my local drive (which I import from a server) and append them at the end (sheets named similar to text file names) in this excel file. Every month, when I import text files, it has to replace this data sheets with new files. Problem: I have found a VBA code in this link! It works

Conditional formatting using the INDIRECT function fails with boolean AND or OR or with cells containing formulas

China☆狼群 提交于 2019-12-07 22:59:08
问题 I have the following function for checking whether column L contains the word "completed" and I use INDIRECT to be able to color the whole row with Conditional Formatting: =INDIRECT("l"&ROW())="completed" This function works. However, I need to extend this, I want to use Conditional Formatting based on an extra cell as well, so I tried this: =AND(INDIRECT("l"&ROW())="completed";INDIRECT("m"&ROW())="duplicate") When I use this second function inside the Excel worksheet they give the proper