ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   enter data that goes two places by category (https://www.excelbanter.com/excel-programming/382954-enter-data-goes-two-places-category.html)

Mark

enter data that goes two places by category
 
I'm creating a form where I enter a data item and want the entry to appear
with the other related entries AND also to be placed in another range defined
by a category used in a pull down in the column to the right of the entry.
Thanks

JLGWhiz

enter data that goes two places by category
 
This is not usable code, but I tried to piece together
something similar to what your post described.


Dim RelatedItems As Range
Dim CategoryDefined As Range
PullDownCategory = ActiveCell.Offset(0, 1).Validation.Value
LastRow = Cells(Rows.Count, "RelatedItems").End(xlUP).Row
LastRow2 = Cells(Rows.Count. "CategoryDefined").End(xlUp).Row
If DataEntered = PullDownCategory Then
Cells(LastRow + 1, "RelatedItems") = DataEntered
Cells(LastRow2 +1, "CategoryDefined") = DataEntered
End If

Maybe you can use it to better describe what you are truing to do.

"Mark" wrote:

I'm creating a form where I enter a data item and want the entry to appear
with the other related entries AND also to be placed in another range defined
by a category used in a pull down in the column to the right of the entry.
Thanks


Mark

enter data that goes two places by category
 
Thanks for the script. I'm sure it will help me -- I just have to think a bit
more about how to apply this. I nearly got what I was looking for with the
use of the DSUM function. I was not able to copy the data to a second
location upon entry but I was able to sum based on a CATEGORY criteria.
Thanks

"JLGWhiz" wrote:

This is not usable code, but I tried to piece together
something similar to what your post described.


Dim RelatedItems As Range
Dim CategoryDefined As Range
PullDownCategory = ActiveCell.Offset(0, 1).Validation.Value
LastRow = Cells(Rows.Count, "RelatedItems").End(xlUP).Row
LastRow2 = Cells(Rows.Count. "CategoryDefined").End(xlUp).Row
If DataEntered = PullDownCategory Then
Cells(LastRow + 1, "RelatedItems") = DataEntered
Cells(LastRow2 +1, "CategoryDefined") = DataEntered
End If

Maybe you can use it to better describe what you are truing to do.

"Mark" wrote:

I'm creating a form where I enter a data item and want the entry to appear
with the other related entries AND also to be placed in another range defined
by a category used in a pull down in the column to the right of the entry.
Thanks



All times are GMT +1. The time now is 08:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com