Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old August 7th 11, 09:09 PM posted to microsoft.public.excel.newusers
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2008
Posts: 30
Default Insert same value across many cells

I have 2 values that are taken from an Inputbox that I need to copy
across a range of cells what would be the best and most efficient way
to do this? I need the values to be inserted into column A & B from
the next Blank Cell in Column A

Thanks

Peter

  #2   Report Post  
Old September 16th 11, 04:36 PM posted to microsoft.public.excel.newusers
external usenet poster
 
First recorded activity by ExcelBanter: May 2010
Posts: 143
Default Insert same value across many cells

On Aug 7, 4:09*pm, Pete wrote:
I have 2 values that are taken from an Inputbox that I need to copy
across a range of cells what would be the best and most efficient way
to do this? I need the values to be inserted into column A & B from
the next Blank Cell in Column A

Thanks

Peter


Perhaps something like:


Sub AB()
Dim A As Range, B As Range
n = Cells(Rows.Count, "A").End(xlUp).Row + 1
Set A = Range("A" & n)
n = Cells(Rows.Count, "B").End(xlUp).Row + 1
Set B = Range("B" & n)
vA = Application.InputBox(Prompt:="Give a value for column A",
Type:=1)
vB = Application.InputBox(Prompt:="Give a value for column B",
Type:=1)
A.Value = vA
B.Value = vB
End Sub




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Blocked from Inserting individual cells or Insert Cut Cells Ching-AHS Excel Discussion (Misc queries) 0 December 1st 09 06:47 PM
Insert Cells every other row Texas Nuckols Excel Discussion (Misc queries) 1 November 11th 09 11:38 PM
Insert Cut Cells susu Excel Discussion (Misc queries) 0 June 5th 08 05:02 PM
Can't insert cells kramer31 Excel Discussion (Misc queries) 2 March 6th 07 11:59 PM
How to insert a value in one cell into many cells Thomas Excel Worksheet Functions 17 October 18th 05 11:03 AM


All times are GMT +1. The time now is 08:12 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017