Inputbox Assign An Array Of Values To A Range

less than 1 minute read

InputBox – Assign an array of Values to a Range

'==================================================================================================
' ## InputBox Example 5: Inputbox to assign an array of values to a range
' Tip: have your selection the same size as the array
' Also...I have no idea how to error handle this after so many attempts.
'==================================================================================================
Sub InputBoxArray() '// Vars Dim varInput As Variant Dim rngSelection As Range '// Assign selected range Set rngSelection = Application.Selection '// Enter an array with curly brackets or select a range varInput = Application.InputBox(Prompt:="Enter {1,2} or select range:", Type:=64) '// Output rngSelection.Value = varInput
End Sub

Tags: inputbox

Categories: vba

Updated: March 29, 2019

Twitter Facebook LinkedIn

1 minute read

Here’s the simple steps to highlight the row and column of the selected cell which can be extremely useful when navigating large sets of data. Here’s a littl…

less than 1 minute read

How it Works Using SEARCH and ISNUMBER When you need to check if a cell contains specific text (or string) we need to combing the SEARCH and ISNUMBER functio…

less than 1 minute read

So you have a 0% value on one of your data labels and want to hide it?

1 minute read

Download the example workbook here: calculate-time-between-dates.xlsx

Leave a Comment