Solved

Data to Edit - Excel

Posted on 2012-04-09
5
277 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
  • 4
5 Comments
 

Author Comment

by:Rayne
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

763 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

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now