Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Data to Edit - Excel

Posted on 2012-04-09
5
Medium Priority
?
286 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 2000 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

636 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