My table keeps changing my cell value after saving

ashley12

New Member
Joined
Dec 6, 2020
Messages
38
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I have a query table in my spreadsheet. I added a column and put "No" in every row (See attached picture for a simplified example). So when the query is refreshed and add more rows, new rows will also have "No" as their starting value. And that's exactly what I want.

Then when the user interact with the spreadsheet, I use some VBA code to update certain cells of the column to "Yes". The problem is whenever the query is refreshed, all the cells in this column changed back to "No".

Do you know why this happens and how to resolve it?

Thanks so much!
 

Attachments

  • Capture.PNG
    Capture.PNG
    2.1 KB · Views: 1

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Anthony47

Well-known Member
Joined
Mar 29, 2006
Messages
2,147
Do you know why this happens and how to resolve it?
I'd say that you have a query that does its job...

You should extract from the query results the information you are interested in and modify this copy; and of course you need a macro, not formulas.

Bye
 

ashley12

New Member
Joined
Dec 6, 2020
Messages
38
Office Version
  1. 365
Platform
  1. Windows
Hi Anthony, I forgot to mention that I added the column onto the spreadsheet not the query, so I'm not sure why it keeps changing back. And no I don't use any formula, I just put "No" as a plain value.
 

Anthony47

Well-known Member
Joined
Mar 29, 2006
Messages
2,147
Probably the query range extends to the cells you are using...
I suggest that you create a copy of the query results, in a separate sheet, and work on these datas

Bye
 

Watch MrExcel Video

Forum statistics

Threads
1,130,129
Messages
5,640,288
Members
417,135
Latest member
zeusmining

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top