I need a list in my form, simple "Name/Number" list (only two options) but i don't want it to refer to any cell in the worksheet. I want to input a text in a textbox and with the selection in the list above i want to have multiple choices at how to approach the text (if i input a name i want it to be different than if i input a number). All the info i came up on the web refers to lists made upon a range of cells. How can i make a list without involving ranges of cells?
In Excel, I want VBA to refer to the SENT ITEMS folder in Outlook. I want to loop over all sent items, and if the email address satisfies a condition, then record that fact in Excel. I am good at VBA in Excel, and I have a passing knowledge of VBA in Outlook, but I don't know how to refer to Outlook within my Excel VBA.
Dim FileToOpen FileToOpen = Application.GetOpenFilename _ (Title:="Please locate BlankSAMSRegister.xlsm", _ FileFilter:="BlankSAMSRegister.xlsm (*.xlsm),") If FileToOpen = False Then MsgBox "No file specified.", vbExclamation, "Error" Exit Sub End If Once this second workbook is open, how do I refer to each one within the subsequent code?
I really need the parent workbook to be named as wb1 and the child to be names wb2 so I can flick between the two in the next macro... I can get the parent using thisworkbook.name, but how do I get the child?
I have a check box whithin a worksheet. This CheckBox doesn't have any linked cell, and doesn't have any macro asigned. know I would like to refer to the value of the checkbox by vba kind of: ?ActiveSheet.Shapes("CheckBox1").value=true 'from the vba's inmediate window
The summary page summarises the source data into how much revenue each department has made over 12 months.
However the formula in Summary worksheet column B will only total up the amounts if the month in the Source worksheet column B is the 1st of the month. How do I change the formula in Summary worksheet column B to purely go by month and ignore the day?
The "summary" tab will be calculating 20 statistics for each of the 30 or more tabs. In an effort to automate this - can I replace writing "January!" with a cell reference? For example; instead of writing = sum(january!a:a). Could I write = sum("A1"a:a), with the A1 Cell = january!. Obviously I tried this and it does not work but I am not sure if there are other options.
I've got a workbook that increments in sheets for each new week. I have a cell showing the current week number for that sheet ( lets say cell C1) and any formulas that need to reference data from the previous sheet do in 'indirect' function which basically looks at the current week number ( lets say week 20)in cell C1 and minus's 1 to navigate to the previous week (week 19).
I was wondering if there was a way to reference the previous sheet purely by the order they're in.
So say i have 5 sheets named "1,4,5,8,9" and these represent week numbers so the sheet named '8' in cell C1 would have '8' standanding for the week number but cells that wanted to reference the previous sheet couldn't do the 'indirect' C1-1 as there is no 'week 7'.
The weeks used could vary alot so a formula to reference the directly previous sheet is needed.
I'm trying to do is add a signature box (for inventory-taking accountability) directly below the pasted area after I paste it. Now, of course, the copied and pasted area could have 5 rows or it could have 15, and when I copy it from the first sheet and paste it into the second it doesn't preserve the name of the range on the second page, so what I really need to do to add the signature box directly below the last row in the pasted area is specify the location in relation to the last row in the pasted selection, but I don't know how to do that. Using ActiveCell always refers to the top-left-most cell in the selected area. So...
If I have an area selected, how do I refer to the bottom-right-most cell in that selection (in the same way that ActiveCell refers to the top-left-most cell)? Or at least the bottom row? Or, even better, the row below the bottom row?
A2 refers to a linked cell but I have tried without the link there still no joy. Together they would generate for example "DCA_RES" which would refer to a column range in a different sheet on the same workbook.
I want this to work so that I can implement more easily new lines to refer to different sheets. (Drag to copy) instead of having to copy and edit a formula 100 times.
I'm trying to call a function that is stored in a cell as a text string. In cell A1, I have the text Sum('Sheet1:Sheet3'!C3). I want to call this function from a different cell. Is this possible using the pre-defined functions, or would I be better creating my own function?
I have a selection that I am going through with a 'for each' and then performing actions if the cells meet a certain criteria. I have been referencing nearby cells with the offset function, but now my sheet is too big and I need to change the code often and the offset function is difficult, is there anyway to refer to cells without the offset function, preferably by column letter
For Each Cel in SelectionIf Cel = x Thenvalue1 = Cel.Offset(0,39).Valuevalue2 = Cel.Offset(0,5).ValueEnd IfNext Cel
with the below code i want the highlighted in red (RC11) to refer to last column and last row.
Code: Sub try () Dim finalrow As Long Dim finalcol As Long Set wspo = Worksheets("Previous Order") wspo.Select finalrow = wspo.Cells(Rows.Count, 1).End(xlUp).Row finalcol = wspo.Cells(1, Columns.Count).End(xlToLeft).Column
In my current spreadsheet I use Offset to change the values of various cells. The problem is that if I make any changes to the columns it throws the whole offset thing off. So, instead of using offset to paste all the data is there an alternative that would work better?
I was thinking maybe I could name a column as a range and then have the cell in that row equal a value.
How can I use (with or without macro) cell text to refer to different worksheets inside a formula. For example I've formula =INDEX(Mary!B9:E17...) but I wanted to write that 'Mary' or whatever sheet name to a cell in one sheet and sheet refenrence in this index-formula would change accordingly.
I have the following code that creates a new workbook and names it after the value of a cell in another workbook. Another part of the macro will switch back and forth between the original workbook and the newly created workbook.
What is the best way to refer to new workbook? I'm familiar with the "workbooks "VARIABLE NAME".Activate" style but, the name of the new workbook will change every time the macro runs and I'm not sure how to refer to it.
the code below.
HTML Code: Sub MakeNewBook() Dim wB As Workbook Dim nPath As String