среда, 29 сентября 2021 г.

Google Таблицы. Как посчитать цветные ячейки.

 Google Таблицы. Как посчитать   цветные ячейки.

Посчитаем цветные ячейки с помощью скрипта. Создаем пользовательскую функцию

function countCellsWithBackgroundColor(color, rangeSpecification) {

  var sheet = SpreadsheetApp.getActiveSpreadsheet();

  var range = sheet.getRange(rangeSpecification);

  var x = 0;

  for (var i = 1; i <= range.getNumRows(); i++) {

    for (var j = 1; j <= range.getNumColumns(); j++) {

      var cell = range.getCell(i, j);

      if(cell.getBackground() == color)

        x++;

    }

  }

  return x;

}

 

Посмотрим как это работает:

 

если интересно как работать с гугл таблицами

см. так же

https://sites.google.com/view/netkredo/google-%D1%82%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D1%8B


Google Таблицы. Определяем цвет ячейки.


Определяем цвет ячейки с помощью скрипта. Создаем пользовательскую функцию

function getBackgroundColor(rangeSpecification) {

  var sheet = SpreadsheetApp.getActiveSheet();

  var cell = sheet.getRange(rangeSpecification);

  return cell.getBackground();

}

Посмотрим как это работает:

если интересно как работать с гугл таблицами

см. так же

https://sites.google.com/view/netkredo/google-%D1%82%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D1%8B

 

 


четверг, 9 сентября 2021 г.

Google Таблицы. Используем именованные диапазоны в формулах IMPORTRANGE

 СОВЕТ. Используйте именованные диапазоны в формулах IMPORTRANGE, чтобы сделать их более надежными.

Давайте рассмотрим стандартную формулу IMPORTRANGE, которая импортирует данные из одного файла Google Sheets в другой:

Вы используете IMPORTRANGE для переноса данных из исходного листа в целевой лист. Формула может выглядеть примерно так:

 

= IMPORTRANGE ("https://docs.google.com/spreadsheets/d/XXXXXXXXXXX/edit#gid=0", "Лист1! A1: D11")

 

где URL-адрес - это исходный URL-адрес таблицы Google, а ссылка на диапазон относится к части данных, которые вы хотите импортировать, в данном случае A1: D11 в Лист1.

В нынешнем состоянии эта формула хрупкая. Если лист переименован в исходном файле (например, в Данные1), он не обновляет автоматически формулу IMPORTRANGE на целевом листе. Таким образом, вы получаете справочную ошибку, потому что исходный лист не может быть найден:

Точно так же, если вы добавляете строки или столбцы к исходным данным, IMPORTRANGE не изменяется, поэтому вы можете получить недостающие данные.

В этом конкретном примере формула IMPORTRANGE ищет только Лист1, чтобы получить все, что она находит в диапазоне A1: D11.

 

Что мы можем сделать, чтобы сделать его более надежным?

 

Используйте именованный диапазон в исходной таблице и формулу IMPORTRANGE!

Выделите данные, которые вы хотите импортировать, в исходной таблице и назовите их, например МоиДанные. Вы можете использовать поле именованного диапазона в верхнем углу сетки (над метками A и 1).

 

Затем используйте это имя в формуле IMPORTRANGE следующим образом:

 

= IMPORTRANGE ("https://docs.google.com/spreadsheets/d/XXXXXXXXXXXXXXX/edit#gid=0", "МоиДанные")

Здесь вместо ссылки на диапазон в IMPORTRANGE вы используете именованный диапазон МоиДанные.

Теперь, если вы переименуете лист в исходном файле Google Sheet или добавите столбцы, это не повлияет на IMPORTRANGE. Любые изменения именованного диапазона будут автоматически отражены на листе назначения.

Это дает дополнительное преимущество, делая вашу формулу IMPORTRANGE более лаконичной.


четверг, 2 сентября 2021 г.

Google таблицы. Шаблон счета для клиента.

 Переходим на лист template



Создаем копию Листа



Заполняем поля


Сохраняем как pdf файл


Чтобы использовать понравившуюся таблицу, откройте её по ссылке, затем нажмите «Файл» → «Создать копию». 


https://docs.google.com/spreadsheets/d/1Jdxp_9OH-pWb-Cg4jf0mgA_vx4XG51s5Q0o-A5lgsOU/edit?usp=sharing



четверг, 19 августа 2021 г.

S&P500 defended at night (in the US), kissed the 4350 level and rushed into growth even before the opening of the main session

 I defended at night (in the USA), kissed the level of 4350 and rushed into growth even before the opening of the main session - I did not have an entry point, the merchants were impatient, it was not very good - they pulled on manipulation at the beginning of the trading session, but it didn’t happen, if only did not want to change. But the slurry thoroughly swung to the long from 11 to 12 Moscow time and already polished it - then it stuck the fracture, bought the closure of Chicago and drove higher - I'll try to stand. Natural gas bounced off retest 3.77 as planned, but the depot was busy with slurry. Husky - looks like a reversal, so a take-out tomorrow is quite likely. Slurry - if this is already a seizure of liquidity in a new bleach contract, then it should go further. The RTS looks like a mess (and neither hoarse, nor slurry, nor natural gas, nor Sberbank, nor Gazprom inspire it today), because the exchange lost - why it persistently gained longs on highs in PN-VT is not clear, because the husky was drawing the distribution these days , and the Eurodollar is in a downward trend, so with the Russian market and the dollar with the ruble as usual - nothing is clear - the exchange deceives itself and tries to go against the hoarse one - and this is a disastrous business. Drag meth - gold has gone sideways, and silver is aiming at the floor - on the Moscow exchange, they may again torment longousts with a non-market spike down, especially if gold bites, if there is free loot, you can set a grid of limits in the range of a couple of dollars down.



воскресенье, 15 августа 2021 г.

S&P 500 At PT on the Eurodollar, gold has risen, silver looks completely lifeless

 At PT on the Eurodollar, gold has risen, silver looks completely lifeless - longousts are locked up. The hoarse one got out of the way, because it was carried out on Thursday, and our ruble market (MIX) ... fell as usual. The RTS was held back by the fall of the ruble dollar (eurodollar all day long). The slurry fell - I closed it - I can't stand it in the weekend, I had to give back more than a third of the profit. From the beginning of the week, they can press down seriously lower, the week from August 16 is expiratory for bleach - it is not yet clear where the exchange is going to cover it. At the beginning of the week, it would be nice to see a hoarse squat, then the growth will continue, without this it will be difficult to grow further from the current ones. RTS - as usual, will be conducted for the hoarse, oil and eurodollar (followed by the dollar, the ruble).



четверг, 12 августа 2021 г.

S&P 500 Hoarse according to plan, hit the news

 Hoarse according to plan, hit the news - Dow Jones fell in the morning (he grew up yesterday), so they are dragging him off (he fell yesterday) - in this way the exchange has money rolling back and forth every day, and at this time the investors of the common market mostly suffer , the news is excellent again, the swing was gaining, the daily exercise, but it took a little, passed early, expected that he would climb tomorrow (Friday take-out is possible), and the hoarse one climbed today. Gold at least sideways (the eurodollar does not go further than yesterday's rebound), and silver is very bad - physicists are getting into it every day in the long, they can trample until they are disappointed. Goo - I'm waiting for the take-out, it's not good that there was a hoarse goo on today's take-out, tomorrow I'll have to look carefully. Friday take-out to the diploma is quite probable, but they can just stand on the side on Friday. RTS copies a hoarse, but not in an orgasm, in my opinion, since natural gas and oil are in a squat, maybe not for this reason, but our market, as you know, can just fall down at any moment just in case - if the exchange suddenly decides to reduce the risks to end of the week. There are a couple of weeks left before Jackson Hall, probably, positive news will be churned out, long swings and races are traditionally taken (for a diploma).