467,881 Members | 1,194 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,881 developers. It's quick & easy.

Excel Question

Expert 1GB
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
  • viewed: 1766
Share:
5 Replies
100+
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 1GB
A button in excel? How do you add a button in excel?
Nov 3 '06 #3
100+
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 1GB
What about one that doesn't require hard coded value like 11000? Is that possible?
Nov 3 '06 #5
100+
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.

Similar topics

6 posts views Thread by Sam Johnson | last post: by
19 posts views Thread by wreckingcru | last post: by
9 posts views Thread by Doug Glancy | last post: by
3 posts views Thread by pleaseexplaintome_2 | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.