Solved

Data to Edit - Excel

Posted on 2012-04-09
5
279 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

816 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

13 Experts available now in Live!

Get 1:1 Help Now