Returning values basic question (probably)

Heartlight

New Member
Joined
May 10, 2018
Messages
3
Hi there,

I am trying to create a formula that scans a column and, if there is any data in that column, list the data on another sheet.

For instance, one sheet is called data and the data sheet has the column 'comments'.
The Comments column has some rows that are blank and some that have text:
Comments
1 Great job!
2 Boring :(
3
4
5 What an ultra maroon.

I have another sheet (called comments) that I want to compile just the comments:
Comments
1 Great job!
2 Boring :(
3 What an ultra maroon.
4
5

If you're interested in the reason for this, I'm tabulating a survey and most of it is statistical data; however, there is a comments section I would like to list, along with my calculations of the statistical data. But I want the program to do the heavy lifting and extract all the comments and place them in a nice, neat and orderly row progression.

Any suggestions are appreciated, thank you!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I could write you a vba script so when a comment is entered into the comment column
It would be immediately entered into another sheet.

But please do not say Comment column please tell me column A or Column G
And into what column on the sheet named "Comment" do you want these comments entered. Again say column B or F do not say column Comment.

This would be done with Vba
 
Upvote 0
That's awesome, thanks!

The sheet where the data is coming from is called "Data" and the column is B.
The sheet where the data is going is called "Understanding" and the column is A.

Thanks again!
 
Upvote 0
Try this:
This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab Named Data
Select View Code from the pop-up context menu
Paste the code in the VBA edit window
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Modified 5/10/18 5:00 PM EDT
If Not Intersect(Target, Range("B:B")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Dim Lastrow As Long
Lastrow = Sheets("Understanding").Cells(Rows.Count, "A").End(xlUp).Row + 1
Target.Copy Sheets("Understanding").Cells(Lastrow, 1)
End If
End Sub

Any time you enter a value in column B this data will be copied to sheet named Understanding
 
Last edited:
Upvote 0
Hi and thanks!

I did as you instructed. It worked for data that hadn't been entered yet - but since I'm just setting up this sheet, that's just fine.

Thank you!
 
Upvote 0
Hi and thanks!

I did as you instructed. It worked for data that hadn't been entered yet - but since I'm just setting up this sheet, that's just fine.

Thank you!

Yes this script works when you enter data. It does not go and copy all values already entered.
Glad I was able to help you.
Come back here to Mr. Excel next time you need additional assistance.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top