Solved

Data to Edit - Excel

Posted on 2012-04-09
5
281 Views
Last Modified: 2012-04-10
Hello All,

I have attached a file where there are already filters to sort and show specific data according to user wants. Now there are two fields that the user wants to play with to determine how much profit he is getting by changing the combination of those two fields. The idea to put the filtered data copy in the first sheet is ok and also prevents users from making changes to the original data EXCEPT for two columns that can be changed to see how much premium is possible. But if the user wants to edit the two fields [sale price], [hold off] of the filtered data, how can that be done in the mainViewSheet after the data has been filtered to user needs? In vba search, form or something not sure.
Again, the idea is that the user narrows down the data set by applying specific filters and then changes the two values for the filtered data set to see the amounts of varying  premium he might get with different combination of [sale price] & [hold off] inputs.

Thank you
R
FilteredData2Edit.xlsm
0
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 

Author Comment

by:Rayne
ID: 37826450
FYI - MainViewSheet houses a copy of the filtered data, not the actual data...
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 37826635
Try this macro. To use it right-click on the sheet tab name for mainviewsheet and select view code and paste the code in this window and close it.
Then you can try changing the two columns from the mainviewsheet

Private Sub Worksheet_Change(ByVal Target As Range)
Dim sr As Long
If Target.Count > 1 Then Exit Sub
If Target.Column <> 5 And Target.Column <> 6 Then Exit Sub
sr = Target.Row
Sheets("Source").Cells(Sheets("Source").Range("C:C").Find(Cells(sr, "C")).Row, Target.Column) = Target.Value
End Sub

Open in new window

0
 

Author Comment

by:Rayne
ID: 37828793
Hi Ssaqibh,

Thank you so much for your help. This is working great. Let say I put 10 in F9, now I already know the column F. (the value has to be changed in column F). The issue is finding the correct row where the change has tio register in source worksheet. Your code does it perfectly but if you could explain this line, that will help me greatl ¿

Sheets("Source").Cells(Sheets("Source").Range("C:C").Find(Cells(sr, "C")).Row, Target.Column) = Target.Value

thank you
R
0
 

Author Comment

by:Rayne
ID: 37828879
I just noticed if you look. There are two identical items – i1 and i1 on the unfiltered list. For example I select P1 and P2 ion the checkboxes, and put 77 and 88 on the column F corresponding to the items i1 and i1 and then I refresh, I don’t see the changes  - 77 and 88 when I again unclick and click the checkboxes.
The likely hood of items repeating in the source list will happen and the same item can be used under different programs
So its not updating correctly in that case...
0
 

Author Comment

by:Rayne
ID: 37828930
I will open up a new question for this duplicate issue. But yes, thank you so much for your  assisting on this one.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question