By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,646 Members | 2,098 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,646 IT Pros & Developers. It's quick & easy.

Excel Question

Expert 100+
P: 1,892
Does anyone know how to select all of the fields in the column that are populated? I want to select all of column B and paste new info in, however I don't want to populate the fields by selecting all of column B. I would highlight all of them then copy but it's 11000 rows and it takes forever to do.

Thanks,
AC
Nov 1 '06 #1
Share this Question
Share on Google+
5 Replies


100+
P: 267
Does anyone know how to select all of the fields in the column that are populated? I want to select all of column B and paste new info in, however I don't want to populate the fields by selecting all of column B. I would highlight all of them then copy but it's 11000 rows and it takes forever to do.

Thanks,
AC
hi

try a button and this small macro
assuming NewInfo for all cell in Column B is same ?

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub CommandButton1_Click()
  3. NewInfo = InputBox("Enter new info", "Info")
  4. If Not NewInfo = vbNullString Then
  5. Counter = 0
  6. Do
  7. Range("B1").Offset(Counter, 0).Value = NewInfo
  8. Counter = Counter + 1
  9. Loop Until Counter = 11000
  10. End If
  11. End Sub
  12.  
  13.  
Nov 1 '06 #2

Expert 100+
P: 1,892
A button in excel? How do you add a button in excel?
Nov 3 '06 #3

100+
P: 267
A button in excel? How do you add a button in excel?
hi
simply click with your right mousebutton on the menubar
select visual basic
from the shown window select toolbox and edit mode
select button from the toolbox
when in editmode you may doubleclick this button to gain access to the codepage, or use Alt+F11
Nov 3 '06 #4

Expert 100+
P: 1,892
What about one that doesn't require hard coded value like 11000? Is that possible?
Nov 3 '06 #5

100+
P: 267
What about one that doesn't require hard coded value like 11000? Is that possible?
hi
yes possible, search in same column for first item to be empty

Expand|Select|Wrap|Line Numbers
  1. Private Sub CommandButton1_Click()
  2. NewInfo = InputBox("Enter new info", "Info")
  3. If Not NewInfo = vbNullString Then
  4. Counter = 0
  5. Do
  6. Range("B1").Offset(Counter, 0).Value = NewInfo
  7. Counter = Counter + 1
  8. Loop Until Range("B1").Offset(Counter, 0).Value = vbNullString
  9. End If
  10. End Sub
  11.  
Nov 3 '06 #6

Post your reply

Sign in to post your reply or Sign up for a free account.