PC Review


Reply
Thread Tools Rate Thread

Adding data from another sheet.

 
 
bdunk
Guest
Posts: n/a
 
      22nd Oct 2003
I hope I can find some help on this one. I have a spreadsheet that
consists of two sheets. The first is a form. The second is a list of
questions. I have added a checkbox next to each question on sheet 2 to
select the question and add it to the form on sheet 1. The problem:
when you select a question on sheet 2 it will only add it to a specific
cell on sheet 1. So if I select question 15 it will go in a position
like it is the 15th question when actually I would like it to be the
first question. The question: Is there a way to make the questions
start adding to the top cell on sheet 1 regardless of which question I
have selected on sheet 2 and also continue to add questions below the
previous question on down the sheet?

Thanks for taking a look

Bdunk



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      23rd Oct 2003
First, I used checkboxes from the Forms toolbar on my sheet2. I put them in
column A. I'd grab the questions from column B of the same row as the checkbox.

I'd also stick a button from the Forms toolbar on that same sheet. Assign it to
this macro:

Option Explicit
Sub testme()
Dim myCBX As CheckBox
Dim oRow As Long
Dim wksCBX As Worksheet
Dim wksList As Worksheet

Set wksCBX = Worksheets("sheet2")
Set wksList = Worksheets("sheet1")

oRow = 1 'top row

With wksCBX
For Each myCBX In .CheckBoxes
If myCBX.Value = xlOn Then
wksList.Cells(oRow, "A").Value _
= .Cells(myCBX.TopLeftCell.Row, "b").Value
myCBX.Value = xlOff
oRow = oRow + 1
End If
Next myCBX
End With

End Sub


It goes through the checkboxes and if it's checked it plops the value in the
adjacent cell into sheet1 (starting with Row 1.

And it clears the checkbox, too.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
bdunk wrote:
>
> I hope I can find some help on this one. I have a spreadsheet that
> consists of two sheets. The first is a form. The second is a list of
> questions. I have added a checkbox next to each question on sheet 2 to
> select the question and add it to the form on sheet 1. The problem:
> when you select a question on sheet 2 it will only add it to a specific
> cell on sheet 1. So if I select question 15 it will go in a position
> like it is the 15th question when actually I would like it to be the
> first question. The question: Is there a way to make the questions
> start adding to the top cell on sheet 1 regardless of which question I
> have selected on sheet 2 and also continue to add questions below the
> previous question on down the sheet?
>
> Thanks for taking a look
>
> Bdunk
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~ View and post usenet messages directly from http://www.ExcelForum.com/


--

Dave Peterson
(E-Mail Removed)
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding new data to another sheet from the main sheet ycwkpp898 Microsoft Excel Misc 1 6th Jan 2009 04:16 PM
Adding data from another sheet =?Utf-8?B?RHVzQG4=?= Microsoft Excel Worksheet Functions 2 15th Mar 2006 02:31 PM
adding data to sheet 2 from sheet 1 jegal76 Microsoft Excel Discussion 4 29th Oct 2005 01:49 PM
adding data from one sheet to another sheet as a dropdown list bo. =?Utf-8?B?Z2F0b3JndXk=?= Microsoft Excel Misc 1 18th Feb 2005 10:51 PM
adding new data on new sheet baha Microsoft Excel Programming 0 18th Aug 2004 12:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:49 AM.